For a managed GtkShortcutController, changing its propagation phase
away from `GTK_PHASE_BUBBLE` currently results in a lingering reference
due to a bug in GTK (gtk#6246). This means the Escape key shortcut
remains active even after leaving the Display panel, resulting in a
crash when pressing Escape in any panel after leaving the Display panel.
This is now fixed in GTK (gtk!7115), but there seems to be no reason for
changing the propagation phase at all anyways. Since the callback
returns `GDK_EVENT_PROPAGATE` when it does not activate, the event
should still make it to other handlers.
So, to speed up the fix for gnome-control-center, we remove the
propagation phase changes althogether. There is also no need to let the
shortcut have global scope, managed is enough.
Closes#2768
When switching from Mirror mode to Join mode
and opening a monitor leaflet child by clicking
its row, clicking Cancel on the title bar would
get the UI into an invalid state.
Closes#2513.
When multiple monitors are available, it's not possible anymore to
configure them all and eventually apply all the changed parameters.
To make this possible again, add a back button in the apply titlebar
that is shown only when we are in the display-settings child.
See: https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/2012043
The start title buttons of the main window should be displayed if and
only if the end title buttons are. Only the left-most header bar should have
the start title button set and only right-most header bar the end title buttons.
Therefore, the title buttons property should be bound to the leaflet state:
When unfolded the start title buttons of the sidebar's header bar are
the only ones visible then, and not a second pair in the panel's header bar.
Likewise, in a folded state of the leaflet, the panel's header bar displays
all availble title buttons – start and end – as the panel is the only widget
displaying a header bar.
Signed-off-by: Markus Göllnitz <camelcasenick@bewares.it>
org.gnome.Mutter.DisplayConfig contains a new property that tells
whether apply will be allowed to be called or not. Whether it is true or
not depends on policy stored in any of its monitors.xml configuration
files.
In order to make it clearer that configuration is not possible, except
for night light, make sure to hide the unconfigurable parts, leaving
only night light.
Move all titlebars to the panel itself. Add an overlay with
the apply titlebar, which shows the apply / cancel titlebar
above whatever current titlebar is visible.
Add titlebars to the Night Light, and display settings pages.
This should significantly simplify these panels, by not forcing
them to override GObject.constructed all the time. Most panels
were quite straightfoward.
This adds a new listbox with a single row, as per
mockups, to switch to the Night Light page; and
also adds a back button to switch back to the main
page.
Fortunately for us, AdwPreferencesGroup makes that trivial.
Move the linked box into an AdwActionRow, and remove the icon
and the margins from the toggle buttons.
"Primary Display" and "Contains top bar and Activities" are visible when
you have >1 display connected and the "Join Displays" option is
selected. I can't work out how to see the "Active Display" string but it
sure looks translatable to me.
This introduces a GtkStack to handle the pages; move the
current panel to be the "displays" page; and adds the
Night Light page as "night-light".
A stack switcher was added, as a header widget, to control
the stack.
https://gitlab.gnome.org/GNOME/gnome-control-center/issues/533
Having the instructions inside can be slightly confusing because
monitors cannot be moved around in the labels area. Simply moving the
instructions to be at the top again improves this.
With this change the dialogs UI matches the old layout more closely.