This leaves menu applets running but invisible, and that's a regression
we need to take care of obviously. But not today, because it's getting
too late.
This patch begins the transition away from the global menu towards
per-window menus instead.
The global menu looks neat, but has always felt clunky, and there
are a number of usability problems with it, especially in programs
with multiple windows.
You can now call GUI::Window::set_menubar() to add a menubar to
your window. It will be specific to that one window only.
Since input events may trigger window portions to be invalidated,
rather than making a round trip to WindowServer to get paint events
we can simply fake an immediate paint event and update the window
contents more quickly.
Improves #5881
When the notification was closed, the connection was kept around. This
caused the core event loop to take up nearly all CPU, so instead of
checking the connection we clear it on close and add state variables
to check state.
With this RefPtr, we can initialize the connection to the
NotificationServer upon showing the notification. With this, we can
prevent double shows and updates or closes before showing.
This commit puts all of the remaining pieces in place. This adds a
mechanism to update the text, title, and icon of an image. If an image
is not provided, the default ladybug will be shown.
If a notification was closed, the connection will now be dead. To
prevent inconsistencies between when a user closes a notification and
when an application closes an applicated, check if the notification has
been closed before allowing any action.
Columns can now be best-fit resized by double-clicking their
grabbable edges. When a default width is set and all data is empty,
double-clicking will restore the column to its original state.
With a little help (read: copy & paste) from ImageWidget, QuickShow will
now cycle through the frames of animated images - enjoy the cat GIFs!
Future improvement: cache decoded images like LibWeb's ImageResource to
waste less CPU - the same applies to LibGUI though, maybe we can put
something shared in LibGfx.
Closes#5837.
The image decoder already tells us whether the image is animated and it
can provide more than one frame, let's not put this behind an artificial
"file path must end with lowercase .gif" barrier.
This was a kludge to paint ComboBox editors before the advent of
accessory windows, isn't being used anymore, and was inadvertently
letting two ComboBoxes paint as if both had focus.
The previous names (RGBA32 and RGB32) were misleading since that's not
the actual byte order in memory. The new names reflect exactly how the
color values get laid out in bitmap data.
Prevents discrete values from being skipped when using the mouse
wheel on SpinBoxes and proportional Sliders. Wheel delta can be
accelerated by holding Ctrl.
If we set selection before the IconView is laid out, it has no size.
So it can't correctly calculate where to scroll. Forcing scroll after
the first resize fixes that.