Commit graph

491 commits

Author SHA1 Message Date
Alice Mikhaylenko
7127c4373d display: Ellipsize the apply/cancel buttons 2023-08-25 08:00:43 +00:00
Alice Mikhaylenko
909c1fc51b display: Reduce the preview width 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
Lukáš Tyrychtr
ba79d849af displays: Use an AdwComboRow for the schedule type of the night light page
GtkComboBox is deprecated and not accessible, so this one is definitely better from this point of view.
2023-07-18 08:29:43 +00:00
Dirk Su
b7c0c42317 Check best_mode exist before adding flag
When there is no compatible clone mode, the best_mode will be NULL
. It will cause gnome-control-center crash when access to the
variable.
2023-06-27 23:34:23 +00:00
Robert Ancell
82ef9d6f05 display: Connect signal handlers in swapped form 2023-06-07 09:12:54 +12: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
Robert Ancell
c7ce4e8962 display: Fix name of parent class variable 2023-06-06 07:54:38 +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
Timotej Šulík
4102a16b40 display: Fix stuck window subtitle in the Displays panel
In case an inapplicable display configuration
is attempted, and the issue is then resolved,
the warning window subtitle remains displayed
even under the "Apply Changes?" title.

Closes #2512.
2023-05-30 00:58:16 +02:00
Timotej Šulík
4fe26944d8 display: Fix gaps when numbering unusable displays 2023-05-28 22:16:10 +00:00
Timotej Šulík
4ed1af010a display: Allow mirroring for any number of displays 2023-05-25 21:35:30 +00:00
Pablo Correa Gómez
7f7b65545c all: meson: do not specify resources from gresource files as dependencies
Meson extracts them by itself and add them as dependencies for the target.
It means one less location to keep track of files, and a lot less boilerplate
around the meson files
2023-05-24 08:34:14 +00:00
Chris Mayo
92c4b6a706 Fix panel crashes due to unknown types in UI descriptions
Error building template class 'CcSearchPanel' for an instance of type 'CcSearchPanel': .:0:0 Invalid object type 'CcListRow'

Error building template class 'CcDisplayPanel' for an instance of type 'CcDisplayPanel': .:0:0 Invalid object type 'CcListRow'

Error building template class 'CcMousePanel' for an instance of type 'CcMousePanel': .:0:0 Invalid object type 'CcIllustratedRow'

Error building template class 'CcKeyboardPanel' for an instance of type 'CcKeyboardPanel': .:0:0 Invalid object type 'CcListRow'

Error building template class 'CcRegionPanel' for an instance of type 'CcRegionPanel': .:0:0 Invalid object type 'CcListRow'

Error building template class 'CcUaPanel' for an instance of type 'CcUaPanel': .:0:0 Invalid object type 'CcListRow'

Error building template class 'CcUserPanel' for an instance of type 'CcUserPanel': .:0:0 Invalid object type 'CcAvatarChooser'
Error building template class 'CcUserPanel' for an instance of type 'CcUserPanel': .:0:0 Invalid object type 'CcListRow'

Error building template class 'CcDateTimePanel' for an instance of type 'CcDateTimePanel': .:0:0 Invalid object type 'CcTzDialog'
cc_tz_dialog_get_selected_location: assertion 'CC_IS_TZ_DIALOG (self)' failed
dumped core
Error building template class 'CcDateTimePanel' for an instance of type 'CcDateTimePanel': .:0:0 Invalid object type 'CcListRow'

Error building template class 'CcInfoOverviewPanel' for an instance of type 'CcInfoOverviewPanel': .:0:0 Invalid object type 'CcHostnameEntry'
2023-04-17 12:14:58 +00:00
Automeris naranja
fe5257bc9e general: Remove a11y labels when they aren't needed
A11y labels aren't needed when using the "activatable-widget"
property, because the relation is set automatically:

https://gitlab.gnome.org/GNOME/libadwaita/-/blob/main/src/adw-action-row.c#L661
2023-04-12 18:34:20 -03:00
Timotej Šulík
4702757b93 display: Fix display enabled toggle visibility 2023-04-11 12:16:54 +00:00
Emad Saadat
ce9c7c289a
display: Make nightlight widgets clamped to same size as other panels
by using an AdwPreferencesPage instead of a plain GtkBox. And also
move disabled infobar out of night_light_settings.
2023-04-06 00:38:32 -07:00
Jonas Ådahl
e561f32d9c display/night-light: Don't leak config manager proxy 2023-04-04 13:39:36 +00:00
Jonas Ådahl
80af5137c1 display/night-light: Disconnect config manager changed handler
Use g_signal_connect_object() to automatically disconnect the signal
handle when the listener object gets destroyed.

Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2333
2023-04-04 13:39:36 +00:00
Emilia Daria Majewska
4bfa57887b display: Removed the loop from the snapping function
In all my tests, the snapping algorithm was successful on the first pass.
2023-03-23 15:52:15 +00:00
Emilia Daria Majewska
4218aa6e4b display: Remove the monitor argument for cc_display_config_snap_output
The function tries to snap all the outputs anyway,
so might as well remove the unnecessary argument.
2023-03-23 15:52:15 +00:00
Emilia Daria Majewska
0aede82e58 display: Try snapping all the displays after a config change
This issue was originally addressed in !257 ("display snap after changes").
However it only dealt with a two-monitor setup, so the user is still
unable to rotate the middle display with three or more monitors.

This commit tries to snap the displays until all are adjacent to
another.
2023-03-23 15:52:15 +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
Jan Pokorný
705ff06d64 display: Add 32:9 to known aspect ratios
Resolution dropdown previously did not show an aspect ratio hint for
32:9 resolutions. This adds the 32:9 aspect ratio to recognized ones.

Fixes #2334
2023-02-09 14:08:46 +00:00
Marco Melorio
acadd521b1 display: Remove deprecated gtk_widget_show/hide usage 2023-01-02 22:10:39 +00:00
TheEvilSkeleton
4ddfecc79d display: Set underscanning_row as activatable widget 2022-12-20 09:24:21 +00:00
Nicolai Syvertsen
5569d40fca Fix monitor order.
Using prepend for optimization but forgot to reverse list.
2022-12-01 01:45:09 +00:00
Felipe Borges
5b3fff1961 display: Show Night Light Unavailable message when running on a VM
See #2020
2022-12-01 01:34:39 +00:00
Felipe Borges
0b6b54a6a4 display: Tweak Night Light unavailable infobar layout
See #2020
2022-12-01 01:34:39 +00:00
Felipe Borges
1abca8dbd0 display: Use heading capitalization for Night Light unvailable infobar
See #2020
2022-12-01 01:34:39 +00:00
Kaustubh Desale
f896693492 display: Update desktop file to include "Night Light"
This makes search results show that the "Display" panel is the place to find the Night Light settings.

Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1563
2022-11-30 09:51:25 +00:00
Mohammed Sadiq
a850a7260b display: Use CcListRow for rows with go-next icon 2022-11-25 20:59:02 +05:30
Mohammed Sadiq
0d74920072 display: Allow the night-light error label to wrap
So that it will wrap when needed and fits better on smaller screens
2022-11-22 15:31:53 +00:00
Jake Dane
89443fe550 desktop: Remove obsolete Bugzilla entries
The `X-GNOME-Bugzilla-*` entries were for use by bug-buddy, a GNOME 2
technology that's been gone for over a decade. These entries are
obsolete and can be removed from all desktop files.

The `X-GNOME-Settings-Panel` entry is also obsolete as far as I can
tell and only these panels had it in their desktop file: notifications,
sharing, sound and user-accounts. These entries can also be removed.

After removing the `X-GNOME-Bugzilla-*` entries, the desktop files have
no more variables in them. The meson `configure_file` step is therefor
pointless—there are no variables to configure. As such the
`*.desktop.in.in` files are renamed to `*.desktop.in` to reflect this
and `meson.build` files are modified to remove `configure_file` step.
2022-10-20 13:20:09 +00:00
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
Marco Trevisan (Treviño)
2f6d086c6f display-config: Parse privacy screen property and expose it per monitor
Each monitor can have a privacy screen property, so read it and expose
so that it can be at upper levels.
2022-07-28 22:47:14 +00:00
Pablo Correa Gómez
624023d633
display: avoid unnecessary gtk_style_context_get_margin call
The margin went unused after the monitor labels moved to the center
of the displays.

Fixes: e7e80efc ("display: Change appearance and size of monitor labels")
2022-07-18 17:58:46 +02:00
Carlos Garnacho
4eb075e5a5 display: Set a smaller width to display arrangement widget
This default size happens to expand the panel content horizontally,
this is seen as small jumps changing between joined and cloned views.
With this slightly smaller size, no further size jumps happen.
2022-07-08 13:41:30 -03:00
Carlos Garnacho
e8fcfc05a6 display: Make "Mirror" option show a single configuration for all displays
Since all displays are constrained to the same options, promote one so it's
shown in the main panel, the rest does work itself out.

Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1849
2022-07-08 13:41:30 -03: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
Carlos Garnacho
e7e80efcbc display: Change appearance and size of monitor labels
Make these rounded everywhere, and have a lighter background and be
centered as per the latest mockups.

Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1850
2022-07-08 13:28:44 -03:00
Carlos Garnacho
2f9ec8b0a8 display: Set CSS class on the display arrangement widget
Instead of doing it via push/pop on the style context at draw time.
This way we will be able to specify and propagate some font style
to the monitor label, since style fonts are per-widget.
2022-07-08 13:28:44 -03:00
Jonas Ådahl
9e4f15353c display: Use virtual clone modes when mirroring
These are not real modes, but just as place holders when generating
'mirror' configurations. The clone modes will be just to match the
flag/dimension, while the actual mode applied will be individual for
each monitor.

This allows monitors to have their own refresh rates, which is possible
since a few mutter versions back. This also matches how mutter itself
generates mirror modes when doing so via the key binding.
2022-06-27 14:06:16 +00:00
Jonas Ådahl
6087c0397b display: Add 'is_preferred()' mode getter 2022-06-27 14:06:16 +00:00
Jonas Ådahl
fc984e90a1 display: Show infobar if night light isn't supported
This may be the case on e.g. fully remote / headless sessions, or as of
now, when using the NVIDIA driver to run a Wayland session.

Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1659
2022-05-17 12:32:48 +02:00
Jonas Ådahl
44293e9db2 display: Add 'NightLightSupported' property support 2022-05-17 12:31:07 +02:00