Rather than loading an absolute filepath in GML files, change the
setter for this property to use a resource path.
This results in a bunch of churn related to issue 22864, but does not
change any functionality.
This is a slight behavior change in some places. Some places did
(r.size().to_type<float>() * max(scale_x, scale_y)).to_type<int>();
After this commit, the semantics are now like `(...).to_rounded<int>()`,
that is we no longer sometimes omit a column or row in the fitted
direction.
Any bitmap load of the style load_from_file("/res/foo") has been
converted to the new pattern load_from_uri("resource://foo").
This will allow for porting more apps to non-serenity targets, as well
as add some flexibility if we want to experiment with other resource
storage formats in the future.
clang-format-20, as used in CI, doesn't catch these instances. On my
machine, I have clang-format-21, which does. Since we plan to move to
clang-format-22 at some point in the future, let's fix these up now.
These files will be touched soon, so let's fix up some feng shui before
the real changes to make the code formatter happy.
...and in a few cpp files too, and clean up missing includes.
Reduces number of files recompiled after touching AK/Math/Hyperbolic.h
from a couple thousand to a handful.
No behavior change.
Removes Gfx::ColorRole, AlignmentRole, WindowThemeRole, FlagRole,
MetricRole, and PathRole from GUI::Variant.
Each of these roles (apart from the WindowThemeRole) was implemented
only for the old Theme Editor (before #13937). Nowadays, the roles are
manually stored in the program, which allows it to group them by
category rather than type.
For sake of completeness, I have also removed WindowThemeRole here, but
I think it might return here in the future, as themes seem like a fresh
new thing. :^)
This makes sorting the memory map entries by size in the process info
window work properly. Previously, the memory region sizes were strings,
so we sorted them in alphabetical order.
This likely regressed in 0388c828be.
The section_label prop is used as config key. But sometimes it
contains spaces. Spaces in config keys are quite ugly and not
following the .ini spec I think, so this commit filters them out.
Previously it was pretty annoying to type on programs like TextEditor
because after every space the trailing whitespace visualizer kicked in
and a red square showed up right where the cursor was.
Now it's only rendered when the cursor is not at the end of the line,
which makes typing feel better!
The EmojiInputDialogWidget currently has no frame style, so
on themes with no window shadow it looks out of place. The
similar CommandPalette dialog uses the Window frame style
like normal windows. With this style the Emoji dialog looks
more uniform and is more distinct from the background with
a window shadow.
I saw there was no shadow behind the emoji input dialog and command
palette so I have decided to enable it by calling set_forced_shadow()
so hopefully it'll be more distinct from it's background and easier
to see :^)
When loading or setting a wallpaper pass the desktop size as the "ideal
size". This allows the loader to appropriately scale vector wallpapers
to match the desktop size.
Long ago (before ded5ba1f87) this was a
NonnullRefPtrVector<Tab>. This meant that settings were applied in the
order the tabs were specified, changing this to a HashMap meant that
settings were applied in an unspecified order, which subtly broken some
things. For example, DisplaySettings assumes the background settings
are applied before ThemeSettings.
This should have been part of f2e381ae19 in #24016.
The Bitmap.h change has the effect that FileManager now shows a
preview of buggie-gray.jpf when opening
/usr/Tests/LibGfx/test-inputs/jpeg2000.
Currently, the only available option is "Classic", but in later patches
this will be used to allow selecting custom window themes (e.g. for
Aero or Luna styles).
It is a little weird that this is in the palette, but it already
contains non-color properties, and placing the window themes here makes
them easily accessible when needed.
To support drag-and-drop for LibWeb, the drag events need the full mime
data from WindowServer, not just the list of stringified mime types. We
only provided the full data in the drop events. This patch provides the
Core::MimeData type, as well as other mouse-event information needed for
LibWeb (what buttons / modifiers are pressed).
To do this, we add a specific WindowServer IPC to inform the Application
of the event. We previously tagged mouse-move events with some drag data
and formed the drag event client-side. That extra data is removed in
favor of this new IPC.
This API will always succeed in creating a String representing the
provided number in base-10.
(cherry picked from commit dd419b5a8df3b9a32478c4a8f0ea9f70334214cd;
amended to update the rest of the system. No conflicts though!)
Our handling of left vs. right modifiers keys (shift, ctrl, etc.) was
largely not to spec. This patch adds explicit UIEvents::KeyCode values
for these keys, and updates the UI to match native key events to these
keys (as best as we are able).
(cherry picked from commit 4fcaeabe1a6acd9f4d5fd811a36f2e86748b2a72;
amended to make the rest of the system build and to keep `Mod_AltGr`
around in addition to adding it as a key)
Co-authored-by: Nico Weber <[email protected]>
Negative numbers now display correctly in SpinBox.
Previously, they displayed as the negative sign only (no number).
Now the user can also type negative numbers into the SpinBox.
This patch adds the common Ctrl-W shortcut to make_quit_action as an
alternate shortcut by default.
The shortcut can be disabled in programs using this key binding for a
different purpose, e.g. closing tabs, or instances where the "close
window" concept would not be applicable, such as CatDog.
To the best of my knowledge, I have disabled the shortcut for any
existing programs in the system where the aforementioned examples or any
additional conflicts would apply.