Commit graph

3345 commits

Author SHA1 Message Date
Jelle Raaijmakers
fae9a05039 PixelPaint: Use box sampling scaling for layer thumbnails 2023-05-19 18:36:36 +02:00
Jelle Raaijmakers
aebc260940 PixelPaint: Add support for box sampling scaling 2023-05-19 18:36:36 +02:00
Jelle Raaijmakers
6b07926466 ImageViewer: Add support for box sampling scaling 2023-05-19 18:36:36 +02:00
Andreas Kling
9fb81c2c4e Revert "ImageViewer: Add support for box sampling scaling"
This reverts commit 032c2a882a.
2023-05-19 13:33:53 +02:00
Andreas Kling
20537ed3da Revert "PixelPaint: Add support for box sampling scaling"
This reverts commit d6aefb1bf1.
2023-05-19 13:33:53 +02:00
Andreas Kling
1c4d69681c Revert "PixelPaint: Use box sampling scaling for layer thumbnails"
This reverts commit 81b30ec372.
2023-05-19 13:33:52 +02:00
thankyouverycool
444470b238 Applications: Improve FSAC error message handling
Fixes apps showing redundant error messages and terminating
unnecessarily on failed file requests. It's nicer to drop the
user off at the equivalent of a default document on failure if
possible.

Also fixes TextEditor not showing response errors for missing files
in the recently opened list.
2023-05-19 06:20:41 +02:00
Jelle Raaijmakers
81b30ec372 PixelPaint: Use box sampling scaling for layer thumbnails 2023-05-19 06:16:14 +02:00
Jelle Raaijmakers
d6aefb1bf1 PixelPaint: Add support for box sampling scaling 2023-05-19 06:16:14 +02:00
Jelle Raaijmakers
032c2a882a ImageViewer: Add support for box sampling scaling 2023-05-19 06:16:14 +02:00
Timothy Flynn
6970f1b6c1 Browser+Ladybird+LibWebView: Handle trivial content APIs in LibWebView
The goal here is to reduce the amount of WebContent client APIs that are
duplicated across every ViewImplementation. Across our three browsers,
we currently:

    Ladybird - Mix some AK::Function callbacks and Qt signals to notify
    tabs of WebContent events.

    Browser - Use only AK::Function callbacks.

    headless-browser - Drop most events on the floor.

Instead, let's only use AK::Function callbacks across all three browsers
to propagate events to tabs. This allows us to invoke those callbacks
directly from LibWebView instead of all three browsers needing to define
a trivial `if (callback) callback();` override of a LibWebView virtual
function. For headless-browser, we can simply not set these callbacks.

As a first pass, this only converts WebContent events that are trivial
to this approach. That is, events that were simply passed onto the tab
or handled without much fuss.
2023-05-17 19:47:05 +02:00
Timothy Flynn
d8b14da380 Browser+Ladybird+LibWebView: Move some common functions to LibWebView
The implementations of handle_web_content_process_crash and
take_screenshot are exactly the same across Browser and Ladybird. Let's
reduce some code duplication and move them to LibWebView.
2023-05-17 19:47:05 +02:00
thankyouverycool
587c44cfbb FontEditor: Filter files by BitmapFont in FilePicker 2023-05-17 06:47:57 +02:00
thankyouverycool
a62f204b25 FontEditor: Show complete filename in error messages
And clean up Save and Open action code style.
2023-05-17 06:47:57 +02:00
thankyouverycool
19b8b9d187 FontEditor: Show recently opened files in File menu
And update GlyphEditorWidget on initialize(). Fixes Editor not showing
the new active glyph when loading recent fonts from a menu.
2023-05-17 06:47:57 +02:00
thankyouverycool
c10b1e3aea FontEditor: Add action text to Undo and Redo 2023-05-17 06:47:57 +02:00
Timothy Flynn
374284d0d8 Browser: Move screenshot context menu actions above inspector actions
Feels a bit more natural, at least to align with muscle memory from
other browsers.
2023-05-16 19:47:18 +02:00
Timothy Flynn
1df0a141af Browser: Add a context menu for video elements
This includes actions such as controlling play state, downloading the
video, and opening the video in a new tab.
2023-05-16 12:48:39 +02:00
Daniel Bertalan
fc003cd248 Userland: Silence or resolve new GCC 13 warnings
GCC 13 produces the following true positive warnings:
- `-Wredundant-move` when trying to move `result->tooltip()`, which
  is a const reference in `Assistant/main.cpp`
- `-Wuse-after-free` when freeing an environment variable before
  removing it from `s_malloced_environment_variables`
- `-Wdangling-pointer` when storing an AST node's `this` pointer to the
  interpreter's node stack in LibJS. This is not actually an issue, as
  it is popped when the scope ends, but GCC has no way of telling this.
2023-05-15 07:00:29 +02:00
Karol Kosek
bde96640ac Spreadsheet: Don't release the file buffer when importing CSV files
CSVImportDialogPage takes and holds a StringView meaning that the data
was dropped instantly and displayed garbage instead.
2023-05-15 06:55:41 +02:00
Karol Kosek
b7558a5ce4 LibGUI+Userland: Store column names in JsonArrayModel as String 2023-05-15 06:42:10 +02:00
Karol Kosek
945f05ed76 Userland: Port Model::column_name() to String 2023-05-15 06:42:10 +02:00
Caoimhe
8bcf5b72eb VideoPlayer: Use LibFileSystemAccessClient 2023-05-14 15:56:49 -06:00
Caoimhe
69396d4c4d VideoPlayer: Store video sizing mode in the configuration 2023-05-14 15:56:49 -06:00
Caoimhe
61add64f0f VideoPlayer: Pledge the "VideoPlayer" configuration domain 2023-05-14 15:56:49 -06:00
Ben Wiederhake
b23a0b409d SystemMonitor: Prefer Core::File, poll ProcessStatisticsReader correctly
The signature of Core::ProcessStatisticsReader::get_all changed, and
instead of requiring a pointer to an open file, it now needs a bool to
indicate whether usernames should be polled or not. `m_proc_all` was
always converted to `false` in `RefPtr::operator bool()`, so we were
missing usernames for a long time.
2023-05-14 13:46:57 +02:00
Fabian Dellwing
b01fcccbbd Userland+Base: Don't run NetworkSettings in elevated mode 2023-05-13 17:59:37 -06:00
Fabian Dellwing
24b1bdca27 NetworkSettings: Use helper script to write config
This change allows us to not run the app with elevated privileges.

It uses the Escalator to call a helper and passes the settings as
JsonObject to it.
2023-05-13 17:59:37 -06:00
Fabian Dellwing
27297d2817 Escalator: Major rework and enable forwarding of stdin/stdout
- Escalator now uses `posix_spawn` instead of `exec`
- Escalator is now able to forward stdin and stdout
- A few general changes to improve code quality
2023-05-13 17:59:37 -06:00
thankyouverycool
7fa8fae786 FontEditor: Allow application to launch without a font
Since LibFSAC requires a reified window before loading a font, it
makes sense to have a safe null state for the app.

This lets us stay alive after a failed file request on startup,
handle failure at any point during initialization, and claw back
memory from all our font RefPtrs.

A default startup font or none at all can now be set in FontEditor.ini
2023-05-13 12:53:49 +02:00
thankyouverycool
24046f9adf FontEditor: Let GlyphEditorWidget initialize a null BitmapFont
And remove public reference getters as there is no guarantee they are
nonnull.
2023-05-13 12:53:49 +02:00
thankyouverycool
0ad5e85163 LibGUI+Applications: Let GlyphMapWidget initialize a null Font
FontEditor will need to clear references to its mutable font in
the future while CharacterMap has no use for the highlights clone,
so let's convert GlyphMapWidget's set_font wrapper into a separate
initialize function for the editor and stop hiding the base function
for others. Setting font null in either ultimately points the map to
the system's default font.
2023-05-13 12:53:49 +02:00
thankyouverycool
cf4ddd1dcf FontEditor: Move common restoration work into restore_state() 2023-05-13 12:53:49 +02:00
thankyouverycool
c7eee16292 FontEditor: Use resultant FSAC filename when Saving-as
Fixes desync between file and title.
2023-05-13 12:53:49 +02:00
thankyouverycool
a0f160bfc4 FontEditor: Use fallible {Input,Message}Boxes
And replace DeprecatedString and fix misnamed argument in show_error()
2023-05-13 12:53:49 +02:00
thankyouverycool
6212e5b1f0 FontEditor: Don't crash on missing icons
Instead of crashing on failed icon loading with TRY(), let's report
missing but non-critical resources in detail and gracefully move on.
2023-05-13 12:53:49 +02:00
thankyouverycool
ea8bcb2f30 FontEditor: Rename m_edited_font => m_font and remove getter
Pithier and it matches the naming convention used in FontEditor's
child widgets. Since it was never used outside MainWidget and there
will soon be no guarantee that m_font is nonnull, the public
BitmapFont& getter has also been removed.
2023-05-13 12:53:49 +02:00
thankyouverycool
1ee78c40ae FontEditor: Remove unnecessary call to hide() NewFontDialog
This workaround has not been needed since 5c92397
2023-05-13 12:53:49 +02:00
thankyouverycool
e2762d8956 FontEditor: Remove unnecessary setters and getters
As these were only used internally, let's simplify things and prevent
potential desync between widget state and saved settings by moving the
logic into their respective actions.
2023-05-13 12:53:49 +02:00
thankyouverycool
e8f2192aca FontEditor: Remove unnecessary deferred invokes
Since moving initialization out of the constructor and recalculating
GlyphMap's content size on range and font changes, these deferrals are
no longer needed.
2023-05-13 12:53:49 +02:00
thankyouverycool
3264b5cab2 FontEditor: Make update_title() private 2023-05-13 12:53:49 +02:00
thankyouverycool
ed3f9347f3 FontEditor: Tighten lambda captures 2023-05-13 12:53:49 +02:00
thankyouverycool
36641187d1 FontEditor: Propagate errors formatting preview text 2023-05-13 12:53:49 +02:00
thankyouverycool
5ec9654477 FontEditor: Propagate errors when loading GML 2023-05-13 12:53:49 +02:00
thankyouverycool
1a30439b11 FontEditor: Port some instances of DeprecatedString 2023-05-13 12:53:49 +02:00
thankyouverycool
0e276e0458 FontEditor: Iterate slope and weight lists by size() 2023-05-13 12:53:49 +02:00
thankyouverycool
2d2133b229 FontEditor: Convert Model lists to Vector<String>
And propagate errors while building them.
2023-05-13 12:53:49 +02:00
Caoimhe
99de0b2c14 HexEditor: Add list of recently opened files 2023-05-11 20:20:40 +01:00
Tim Ledbetter
cf4a43e4c0 Chess+GameSettings: Optionally highlight the king when in check
When either king is in check, its square is now highlighted with a red
background. This behavior can be toggled in GameSettings.
2023-05-10 12:13:35 +01:00
James Liu
f248f566b8 Help: Fix link to Contents page 2023-05-10 09:13:07 +01:00