1917 Commits
Author SHA1 Message Date
Andrew Kaster 644e3c9e8a LibGUI: Include limits in Window
We use INT_MAX in a few places, but didn't explicitly load limits.h,
expecting that other system headers would pull it in.
2026-09-10 16:53:14 +02:00
Eduardo Casadei 08d6b7387e LibGUI: Validate shortcuts before finding the corresponding Action 2026-09-02 11:20:43 +02:00
Hendiadyoin1 8db84e38b5 LibGUI: Explicitly specify constructor forwarding in custom Variant type
Otherwise we may end up in a delegation loop.
2026-08-15 08:04:07 +02:00
Andrew Kaster 08b69787e6 LibGUI+Applications: Rename Button::set_icon_from_{path,resource}
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.
2026-07-26 10:18:45 -04:00
Nico Weber 44d5e571df Everywhere: Use Rect::scaled_to_fit_within() and Rect::scaled_to_cover()
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.
2026-07-26 10:13:47 -04:00
Andrew Kaster f4773b0c36 Userland: Convert bitmap resource loads to load from resource URIs
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.
2026-07-12 14:42:21 -04:00
Andrew Kaster d5116eeebb Userland: Clean up some const west instances
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.
2026-07-12 14:42:21 -04:00
Nico Weber e897b9d744 Everywhere: Use more granular AK/Math/ includes in a few headers
...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.
2026-06-21 15:26:06 -04:00
Bastiaan van der Plaat e86ef471f6 LibGUI: Let AbstractButton sibling callback respect allow_callback 2026-05-29 16:32:03 +02:00
Lucas Chollet 78bb69ed9a LibGUI: Use an idiomatic integer type name in TextEditor 2026-04-27 16:07:31 +02:00
t4ccer 9b7f3699af LibGUI: Account for fixed elements in scrollbar visibility calculation 2026-02-17 19:50:24 -05:00
Sönke Holz d39ca40dbb LibGUI: Update AboutDialog copyright to 2018-2026 :^) 2026-01-25 21:47:42 +01:00
po-nuvai db6317d63f Everywhere: Fix spelling errors in comments
Fix common spelling mistakes:
- "recieved" -> "received"
- "recieves" -> "receives"
- "reciever" -> "receiver"
- "seperately" -> "separately"
2025-12-29 11:23:17 -05:00
Karol Kosek 26e11a69b1 LibGUI: Remove unused theme roles from Variant
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. :^)
2025-11-10 09:12:22 -05:00
Andreas Kling 02fd716e36 LibIPC: Move stuff from Connection.h to .cpp and reduce #include count
(cherry picked from commit 4fe21e6d87259718f2d2a727a479e780963d76f4;
amended to add missing includes to various serenity components)
2025-10-29 12:55:26 -07:00
Sönke Holz b2e18ce8dc LibGUI: Don't convert JSON numbers to strings in JsonArrayModel
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.
2025-10-20 14:51:30 -04:00
Lucas CHOLLET 0ff1f39b8b Everywhere: Run clang-format
The following command was used to clang-format these files:

    clang-format-20 -i $(find . \
        -not \( -path "./\.*" -prune \) \
        -not \( -path "./Base/*" -prune \) \
        -not \( -path "./Build/*" -prune \) \
        -not \( -path "./Toolchain/*" -prune \) \
        -not \( -path "./Ports/*" -prune \) \
        -type f -name "*.cpp" -o -name "*.mm" -o -name "*.h")
2025-10-10 00:02:50 +02:00
Lucas CHOLLET 27e8dc5cbf Everywhere: Prefer = default; to define [con,des]tructors
These lines would change with the new clang-format, so we might as well
use the preferred `= default`.
2025-10-10 00:02:50 +02:00
Bastiaan van der Plaat 4efb4e2ff1 LibGUI: Remove spaces from DynamicWidgetContainer config key
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.
2025-10-02 22:07:43 +02:00
Vinicius Deolindo 528e88d229 LibGUI: Don't render trailing whitespace when cursor is at last column
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!
2025-09-25 21:05:59 +02:00
Bastiaan van der Plaat 3c18c81eec LibGUI: Automatically close detached widget windows 2025-09-03 16:06:59 -04:00
Bastiaan van der Plaat de9073d6b8 LibGUI: Toggle statusbar corner visibility on window resizable change 2025-09-03 16:06:59 -04:00
Bastiaan van der Plaat 295d055628 LibGUI: Give EmojiInputDialogWidget a window frame style
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.
2025-08-31 23:23:23 -04:00
TheOnlyASDK 8382892cff LibGUI: Force shadows in emoji input dialog and command palette
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 :^)
2025-08-29 19:24:41 -04:00
implicitfield bebee66d41 Everywhere: Remove unneccessary virtual specifiers
All of these classes are final, so these methods don't need to be
virtual.
2025-08-28 08:03:50 -04:00
MacDue ecec1ab62a Userland: Improve support for vector desktop wallpapers
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.
2025-07-06 08:27:03 +02:00
theonlyasdk 5a8771a2d0 LibGUI: Scroll to cycle tabs
Tabs will cycle through if the user scrolls on the TabWidget while
holding down the shift key.
2025-06-11 17:32:51 +02:00
Hendiadyoin1 5b7b3ae6a4 LibGUI: Move JsonArrayModel destructor out of line
Not sure why this is needed but otherwise SystemMonitor can't find the
symbol...
2025-06-03 18:25:03 +02:00
MacDue 82f8dbcf45 LibGUI: Update AboutDialog Copyright 2018-2025
Just noticed this... Better late than never 😅
2025-06-01 14:44:37 +02:00
theonlyasdk 362b391726 LibGUI: Prevent repeated entries into panning mode 2025-05-18 20:02:17 +02:00
MacDue f27e4c1058 LibGUI: Use OrderedHashMap for SettingsWindow tabs
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.
2025-04-28 08:34:08 -04:00
Nico Weber 83ff0da6b1 LibGfx+LibGUI: Add .jpf to known image extensions
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.
2025-01-30 19:08:02 -05:00
MacDue fac74f51a3 ThemeEditor+LibGfx: Add WindowTheme to General section 2025-01-06 20:19:52 -05:00
MacDue 61b0939ddc LibGUI: Fix preview of new window themes in AbstractThemePreview
This now calls into the theme's button layout, and composites the
windows (similar to the WindowServer) to fix alpha issues on the window
borders.
2024-12-30 06:36:48 -05:00
MacDue 94f06cdd33 LibGfx+WindowServer: Allow specifying a window theme in the palette
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.
2024-12-17 19:04:58 -05:00
Timothy Flynn 81e469c911 LibGUI+WindowServer+Applications: Carry more data across drag events
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.
2024-12-04 08:00:21 -05:00
Andreas Kling 073b3b992d AK: Make String::number() infallible
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!)
2024-11-29 16:03:30 -05:00
Timothy FlynnandNico Weber 965e1baa8c LibWeb+UI: Detect and handle left vs. right modifier keys
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]>
2024-11-28 15:15:36 -05:00
MacDue 470b62c9f3 NotificationServer+LibGUI: Support adding launcher URLs to notifications
This now allows attaching launcher URLs to notifications so that
clicking a notification can perform an action (such as opening the
Downloads folder).
2024-11-16 15:05:44 -05:00
MacDue 16f22a6943 LibGUI: Initialize primitive fields in Notification class 2024-11-16 15:05:44 -05:00
Nico Weber ec0bc76fe4 LibGfx+Clients: Remove Painter::ScalingMode forwarding declaration
No behavior change. Follow-up to #25065.
2024-10-20 21:06:08 -04:00
Nico Weber 05779fd00d LibGfx+Clients: Remove Painter::LineStyle forwarding declaration
No behavior change. Follow-up to #25065.
2024-10-20 19:43:24 -04:00
Marcus Nilsson 796cd3576f LibGUI: Read and write clipboard metadata to json 2024-09-25 14:54:01 -04:00
mkblumenau 02157e3eaf LibGUI: Improve how SpinBox handles negative numbers
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.
2024-07-19 21:20:52 +01:00
Alec Murphy 84d66ac538 LibGUI: Add alt shortcut for make_quit_action
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.
2024-07-12 09:54:28 -04:00
Dan Klishch 2360df3ab8 Everywhere: Define even more destructors out of line
You guessed it, this fixes compilation with LLVM trunk.
2024-06-30 08:52:07 +02:00
Andreas Kling 3020c5766e LibGfx: Remove unnecessary use of LibGUI in Gfx::Palette
Let's not require a cross-library badge like this.
2024-06-02 20:26:56 +02:00
Matthew Olsson a5f4c9a632 AK+Userland: Remove NOESCAPE
See the next commit for an explanation
2024-05-22 21:55:34 -06:00
Tim Ledbetter 6290f96aa7 LibGUI: Don't crash when rendering a collapsible toolbar with no items
This prevents a crash in GML Playground that would occur when
previewing a GUI with a collapsible toolbar.
2024-05-15 08:28:24 +02:00
Sam Atkins 3695344d6f LibGUI: Add tooltips to DynamicWidgetContainer control buttons 2024-05-04 14:01:57 +02:00