Commit graph

45 commits

Author SHA1 Message Date
Automeris naranja
4de38989f0 display: Add an icon to the Night Light row 2024-05-01 14:36:09 +00:00
Matthijs Velsink
e7e9753aac display: Fix crash due to shortcut propagation phase
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
2024-04-19 09:15:04 +00:00
Automeris naranja
d997c6e0fa general: Remove "activatable" property from some CcListRows
The CcListRow template already sets the row
as activatable[1].

[1] https://gitlab.gnome.org/GNOME/gnome-control-center/-/blob/gnome-45/panels/common/cc-list-row.ui?ref_type=heads#L4
2024-02-20 07:32:37 +00:00
Automeris naranja
c2a7e2e4ab display: Add missing mnemonics
Partially fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2541
2023-11-27 09:51:46 +00:00
Alice Mikhaylenko
7127c4373d display: Ellipsize the apply/cancel buttons 2023-08-25 08:00:43 +00:00
Alice Mikhaylenko
4680f362f3 Port to AdwNavigationSplitView 2023-08-25 08:00:43 +00:00
Alice Mikhaylenko
df06d76eab display: Port to AdwNavigationView and AdwToolbarView
Duplicate the apply titlebar between pages. This should really be
redesigned.
2023-08-25 08:00:43 +00:00
sunflowerskater
266c55715a general: Add tooltips to headerbar controls
Acc. HIG, "controls in the header bars of primary windows should all have tooltips".

https://developer.gnome.org/hig/patterns/feedback/tooltips.html
2023-06-06 13:27:00 +00:00
Timotej Šulík
8bf042cf56 display: Fix invalid panel state after canceling changes
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.
2023-06-01 08:30:20 +00:00
Robert Ancell
f756184e3b display: Do signal handlers in swapped form 2023-05-30 08:36:22 +00:00
Marco Trevisan (Treviño)
852b39cdc6 dispaly: Allow configuring all monitors and apply settings at once
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
2023-03-21 15:33:16 +00:00
Markus Göllnitz
98f7a40d24 multiple panels: show start title buttons in header bar
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>
2023-03-16 13:18:37 +00:00
Mohammed Sadiq
a850a7260b display: Use CcListRow for rows with go-next icon 2022-11-25 20:59:02 +05:30
Felipe Borges
37921f8a46 display: Fix primary monitor selection issue with AdwComboRow
We were connecting to the selected-index property when AdwComboRow
actually has a selected-item property. This is the same as
issue #2025

Fixes #2028
2022-08-24 11:18:35 +02:00
Mpho Jele
5782c7312c display: remove unused night light dialog code 2022-08-15 08:14:27 +00:00
Carlos Garnacho
dc8eb2c22c display: Set "Multiple Displays" option on top
And make the display arrangements widget a row of the displays
preferences group, as per the latest mockups.

Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1851
2022-07-08 13:41:30 -03:00
Lukáš Tyrychtr
f7d0aa7a12 Add missing labels 2022-05-10 03:40:47 +00:00
Jonas Ådahl
21862c3e48 display: Only display configuration options if apply is allowed
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.
2022-01-25 16:43:26 +00:00
Georges Basile Stavracas Neto
82c87578cd window: Install action to navigate main leaflet
This allows implementing the back button of panel titlebars
trivially, which is also done in this commit.
2022-01-20 02:23:42 +00:00
Georges Basile Stavracas Neto
b756f1e07a display: Rework titlebar handling entirely
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.
2022-01-20 02:23:42 +00:00
Georges Basile Stavracas Neto
4300a4a290 panels: Use new CcPanel helpers for title widgets
This should significantly simplify these panels, by not forcing
them to override GObject.constructed all the time. Most panels
were quite straightfoward.
2022-01-20 02:23:42 +00:00
Georges Basile Stavracas Neto
0ab20af9ba panels: Switch to CcPanel content
Start porting panels to the new panel format. This commit
temporarily makes panels have two titlebar, which will be
fixed soon.
2022-01-20 02:23:42 +00:00
Georges Basile Stavracas Neto
9d324452c5 display: Use AdwLeaflet in CcDisplayPanel
This makes the transition between the main page, night light,
and display preferences more inline with other GNOME apps
using GTK4.
2022-01-18 17:03:14 +00:00
Georges Basile Stavracas Neto
06caebd0ba display: Remove SINGLE mode
We control monitors individually now, making the SINGLE mode
unnecessary.

Remove the SINGLE monitor mode, and replace it with JOIN if
required.
2022-01-18 17:03:14 +00:00
Georges Basile Stavracas Neto
de758cc962 display: Show monitor settings in main page when single
When there's only one display, there's no need to redirect
users to another page. In this case, simply move the settings
widget to the main page.
2022-01-18 17:03:14 +00:00
Georges Basile Stavracas Neto
9ca9877520 fixup! display: Move display settings to a separate page 2022-01-18 17:03:14 +00:00
Georges Basile Stavracas Neto
7091ddee49 display: Remove display section from main page
We'll soon replace this by rows, so let's remove these widgets
now. They accounted for a lot of the complexity of the panel!
2022-01-18 17:03:14 +00:00
Georges Basile Stavracas Neto
da599ec252 display: Move display settings to a separate page
Right now there's no way to reach this page, but we'll add
ways in the next commits.
2022-01-18 17:03:14 +00:00
Georges Basile Stavracas Neto
8c8e123690 display: Add row to switch to Night Light page
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.
2022-01-18 17:03:14 +00:00
Georges Basile Stavracas Neto
c5f984c247 display: Adjust styling of arrangement widget
Use the "card" style class to make it visually similar to
other elements of the panel.
2022-01-18 17:03:14 +00:00
Georges Basile Stavracas Neto
f05fe78a98 display: Move display arrangement to the top
As per mockups. No functional changes.
2022-01-18 17:03:14 +00:00
Georges Basile Stavracas Neto
07c4e0f6d3 display: Rename variable
The config_type_switcher_group preferences group now handles
more than config_type_switcher_row, so adjust the naming to
match that.
2022-01-18 17:03:14 +00:00
Georges Basile Stavracas Neto
2a838f8684 display: Move primary display row to display type group
As per mockup. Over the next commits, more parts of the
display panel will be moved to this group.
2022-01-18 17:03:14 +00:00
Georges Basile Stavracas Neto
dd1817f5b8 display: Move config type toggles into a row
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.
2022-01-18 17:03:14 +00:00
Georges Basile Stavracas Neto
8a353c0cdd display: Remove arrangement group description
As per mockups.
2022-01-18 17:03:14 +00:00
Georges Basile Stavracas Neto
983ac203e0 display: Remove "Display Mode" title
As per mockups. In preparation for future changes.
2022-01-18 17:03:14 +00:00
Georges Basile Stavracas Neto
f598fb3ed6 display: Port to GTK4 2021-12-14 22:34:21 -03:00
Adrien Plazas
f06379e30c Replace HdyColumn by HdyClamp
In libhandy 1, HdyClamp replaces HdyColumn. This stops setting values
when they match HdyClamp's defaults.
2020-07-20 08:04:28 +02:00
Robert Ancell
73469d3ba2 display: Replace GtkStack child names with widget references
The child names are easier to break if widgets are changed - this can't be
detected by the compiler.
2020-03-30 01:45:57 +00:00
Will Thompson
fd93886f6f display: mark 3 missed translatable strings
"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.
2019-10-03 17:18:00 +01:00
Georges Basile Stavracas Neto
50be7b13c8 display: Make night light a panel page
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
2019-06-16 01:01:36 +00:00
Benjamin Berg
638f2065a5 display: Do not expand display enabled switch
Fixes #367
2019-02-22 13:44:39 +00:00
Benjamin Berg
1accfac4ef display: Move arrangement instructions outside of view area
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.
2019-02-11 18:59:32 +01:00
Adrien Plazas
ba6106dfca display: Use a HdyColumn
This allows the panel to better adapt to the available width.
2019-01-29 17:23:20 +01:00
Benjamin Berg
d9a7c84905 display: Rewrite as a template widget 2019-01-29 12:05:43 +01:00