Commit Graph

2782 Commits

Author SHA1 Message Date
kleines Filmröllchen
2aa374eba1 Help+LibManual: Move URL handling to LibManual 2023-01-02 06:15:13 -07:00
kleines Filmröllchen
aa5e574872 Help+LibManual: Make the children accessor fallible
This is convenient for the section node which might compute children
on the fly.
2023-01-02 06:15:13 -07:00
kleines Filmröllchen
437d3ca0ea Help: Use array size instead of sizeof to determine number of sections
This was a relict when the sections were still a help-internal array.
2023-01-02 06:15:13 -07:00
kleines Filmröllchen
1ec0548158 Help: Only toggle open/close for SectionNodes
The responsible code was actually casting everything to a SectionNode
pointer, violating type safety all over the place and leading to
frequent crashes. I'm surprised this was not exhibited before; I guess
my recent changes made this bug surface.
2023-01-02 06:15:13 -07:00
Sam Atkins
59d9d1d07a ThemeEditor: Make GUI initialization fallible
To do this, all GUI logic is moved into try_create() factory functions.
2023-01-01 09:55:05 -05:00
Andreas Kling
e3b9f78eb9 MouseSettings: Tweak "Natural scrolling" checkbox size
The old size wasn't wide enough to accommodate a focus rect, and we
ended up clipping the right edge of it.
2023-01-01 13:48:29 +01:00
Cody Hein
ab8522aa17 PixelPaint: ColorPicker updates user colors while dragging
Now the user can hold primary and/or secondary mouse buttons
and move the mouse around while previewing the color on the
statusbar and fine tune their selection. The color will update
live so the color selected when mouse is released is the final
color used.
2022-12-31 04:49:19 -07:00
Cody Hein
29665668b6 PixelPaint: Allow ImageEditor event to append info to the statusbar
This provides an event on ImageEditor for other functions to
activate functions when appended_status_info is updated
2022-12-31 04:49:19 -07:00
Rafał Babiarz
3454891d38 Browser: Add window to inspect history 2022-12-31 04:36:22 -07:00
implicitfield
d49fccf0d5 ThemeEditor: Support editing color schemes 2022-12-31 04:20:59 -07:00
implicitfield
800c292be8 Terminal+LibVT: Get the color scheme from the system theme 2022-12-31 04:20:59 -07:00
implicitfield
4aec8491d6 Everywhere: Move Base/res/terminal-colors to Base/res/color-schemes 2022-12-31 04:20:59 -07:00
Karol Baraniecki
451ae985bf Calculator: Add adding/subtracting/multiplying/dividing by a percentage
It's now possible to easily calculate 50% of 50. :^)
2022-12-31 00:07:13 +01:00
Karol Baraniecki
21cc8f65f5 Calculator: Support chaining and repeating operations
The calculator now supports chaining (hitting "1+2+3=" shows "6"
instead of "5") and repeating ("2+2===" shows "8") operations. :^)
2022-12-31 00:07:13 +01:00
Karol Baraniecki
ef9fd6c286 Calculator: Fix which digits get animated when pressing keyboard keys
Previously every digit press would appear like "0" was pressed on the
keypad.
2022-12-31 00:07:13 +01:00
Andrew Kaster
18c559b0e3 SoundPlayer: Pledge proc so that we can actually open audio files 2022-12-31 00:04:34 +01:00
Ravi J
3a31f37b3d MouseSettings: Update "switch buttons" icon to reflect checkbox state
Using an additional "right button" variant of the graphic, it now
updates the icon based on the user's preference of primary button.
2022-12-30 09:20:42 -05:00
Karol Kosek
780d46c424 Presenter: Accept file drops 2022-12-29 10:22:49 -05:00
Jelle Raaijmakers
7b0adee487 LibGfx+Overall: Remove is_null from Point, Rect and Size
Having a `Point`, `Rect` or `Size` claim it's `null` is silly. We have
`Optional<T>` for that. For `Point`, rename `is_null` to `is_zero` to
better reflect what we're testing. For `Rect` and `Size`, `is_null` is
removed outright.

Also, remove `is_empty` from `Point`. Points can't be empty.
2022-12-28 22:32:21 -05:00
Liav A
e11dcd21c1 Applications: Remove i686 support 2022-12-28 11:53:41 +01:00
Liav A
85b453c2e4 Kernel+Userland: Remove dependency on i386-specific registers 2022-12-28 11:53:41 +01:00
Tim Ledbetter
fd3639ecba PixelPaint: Erase old active layer boundary when active layer changes 2022-12-26 09:40:11 +01:00
thankyouverycool
d938b9effe LibGUI+Applications: Rename automatic scrolling timer functions
Renames on_automatic_scrolling_timer_fired() =>
	automatic_scrolling_timer_did_fire()

The 'on_' prefix is usually reserved for AK::Function hooks.

Renames set_automatic_scrolling_{active,timer}() =>
	set_automatic_scrolling_timer_active()

For consistency, accuracy, and header file A E S T H E T I C S
2022-12-26 09:27:19 +01:00
Kampsjaak
cf47c850e7 TextEditor: Add option to open the current file in File Manager
This change adds functionality to open the current file in the File
Manager from the File menu or through a button on the toolbar. If
there is no saved data then the functionality is disabled.
2022-12-23 19:20:53 -05:00
Tim Schumacher
8455d58a44 LibCore: Use a StringView for the file path in File::remove
This allows us to use our nice syscall wrappers, avoids some accidental
string copying, and starts to unlink us from the old DeprecatedString.
2022-12-23 10:38:14 -05:00
Tim Schumacher
9805f73704 LibCore: Remove the force parameter from File::remove
About half of the usages were not using `force` anyways, and the other
half presumably just got confused about what "force" really means in
this context (which is "ignore nonexistent files").

The only 'legitimate' user, which is `rm`, instead now handles this
completely internally instead.
2022-12-23 10:38:14 -05:00
Tim Schumacher
355e761a02 LibCore: Let File::remove return a normal ErrorOr
Having the file path in there is nice, but it makes us incompatible with
comfortable error propagation in everything that isn't File::remove.
2022-12-23 10:38:14 -05:00
ericLemanissier
21e8099e42 FileManager: Propagate errors while loading bmp 2022-12-23 12:23:05 +00:00
FrHun
f413033a50 Magnifier: Add ability to drag the location when it is locked 2022-12-23 12:16:46 +00:00
FrHun
9d3debcbbe Magnifier: Remember grid color 2022-12-23 12:16:46 +00:00
FrHun
79f5c49afe Magnifier: Eliminate flickering when downsizing
Previously the content flickered when downsizing the window, because the
previously grabbed frame was still active, but was now too large for the
window.
This crops the source rect to a size where it now perfectly fits the
content area.
2022-12-23 12:16:46 +00:00
FrHun
9e0deb76b2 Magnifier: Prevent 0 size that otherwise hangs 2022-12-23 12:16:46 +00:00
FrHun
808eafcf1e Magnifier: Add option to choose grid color 2022-12-23 12:16:46 +00:00
FrHun
2b635b5330 Magnifier: Add option to display grid over the image 2022-12-23 12:16:46 +00:00
FrHun
837625e422 Magnifier: Allow locking location at current cursor position 2022-12-23 12:16:46 +00:00
Optimoos
d856dae07c Spreadsheet: Allow Functions Help HorizontalSplitter to resize
Using set_fixed_width prevents the splitter from resizing, so it has
been changed to set_preferred_width. Added a FIXME that I'm not
familiar enough with the codebase to tackle yet.

This addresses issue #16589
2022-12-23 07:53:26 +00:00
Kemal Zebari
1dddefa737 Browser: Introduce action for opening bookmarks in a new window
This change introduces an action to bookmarks that allows them to be
opened in a new browser window. This is done by accessing any
bookmark's context menu and pressing "Open in New Window".
2022-12-21 08:34:08 +00:00
Alexander Narsudinov
03107d4028 FileManager: Handle possible ByteBuffer allocation failure
Before this patch we created ByteBuffer with the help of the
VERIFY macro that could cause a crash of FileManager
in case of memory allocation failures.

Now we propagate the error to a caller instead of using the
`release_value_but_fixme_should_propagate_errors()` method.
2022-12-20 11:04:44 +01:00
Cnidarias
0ca1247a7f PixelPaint: Propagate errors when creating images or layers
This fixes a dozen release_value_but_fixme_should_propage_errors
2022-12-20 10:42:11 +01:00
Jelle Raaijmakers
25f2e4981c AK: Stop using DeprecatedString in Base64 encoding 2022-12-20 10:34:19 +01:00
Rodrigo Tobar
89061883f2 PDFViewer: Prompt password for encrypted documents
This tackles a FIXME, but also makes sense to implement only now that
the SecurityHandler logic has been fixed. When a Document is created an
automatic attempt is made to provide the empty string as the password;
even if this attempt failed the SecurityHandler still reported it had a
user password, hence we never arrived to the VERIFY_NOT_REQUIRED line
this commit is changing.
2022-12-20 10:28:58 +01:00
Rodrigo Tobar
b8dc05a08e PDFViewer: Fix indexing error in ErrorsView
I confused myself when implementing this, plus I tested using pages that
had errors in pages 1 and 2, so the index and the number of the page
(internally represented as 0-indexed) was always the same. When opening
files with errors on higher pages it became evident that there was an
issue with how I was reading the errors per page from the corresponding
ModelIndex object.
2022-12-20 10:28:58 +01:00
thankyouverycool
91609f9327 FontEditor: Update preview window after pasting and deleting glyphs 2022-12-20 10:22:27 +01:00
thankyouverycool
96d7964913 FontEditor: Add Unicode block/glyph selection Statusbar Segment
Displays the current active Unicode block range, or, if multiple
glyphs are selected, their count. Clicking toggles the Unicode
block ListView.
2022-12-20 10:22:27 +01:00
thankyouverycool
40e94a315a LibGUI+FontEditor: Restore normalized selections on Undo/Redo
Selections are always normalized when saving undo commands.
The restore_selection() function reverses this process so
negatively sized selections (created right-to-left) continue
to resize correctly with the keyboard when restored.
2022-12-20 10:22:27 +01:00
thankyouverycool
61d214eab1 FontEditor: Set Unicode ListView's focus proxy to its search box
Provides a visual cue that arrow key input is shared between these
widgets.
2022-12-20 10:22:27 +01:00
thankyouverycool
b8969ffe97 FontEditor: Remove unused includes 2022-12-20 10:22:27 +01:00
Karol Kosek
9b3335723f TextEditor: Suggest saving new files with an extension from highlighter 2022-12-19 14:13:50 -05:00
Karol Kosek
b00865bce5 LibSyntax+TextEditor: Move Highlighter::language_string() out of class 2022-12-19 14:13:50 -05:00
MacDue
3de5dcf383 Browser+WebContent: Fixup some DOM inspector weirdness
This fixes a few things I noticed whilst working on the inspector
for Ladybird.

1.
The computed and resolved values were being passed swapped around
from the inspect_dom_node() IPC call. I.e. computed values were
passed as resolved values and vice versa. This was then fixed by
swapping them again in the InspectorWidget (two errors canceled out).

2.
Resolved values were called "specified values" seemingly only in the
inspect_dom_node() IPC calls. This was a little confusing so I've
renamed them to back to "resolved values" for consistency.

3.
The inspector took and stored the DOM JSON strings unnecessarily,
all the models immediately parse the JSON and don't need the strings
to hang around.
2022-12-19 11:37:56 -05:00