Commit graph

465 commits

Author SHA1 Message Date
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
Robert Ancell
0118598763 display: Fix typo in a11y attribute 2022-05-11 12:07:31 +12:00
Pablo Correa Gómez
92ee00e39b display: Wrap Night Light GtkInfoBar label to fit in narrower screens 2022-05-10 04:37:42 +00:00
Lukáš Tyrychtr
f7d0aa7a12 Add missing labels 2022-05-10 03:40:47 +00:00
Marco Trevisan (Treviño)
f55639cabb display: cleanup monitors list disposition 2022-04-24 12:21:14 +00:00
Marco Trevisan (Treviño)
c6da230052 display: Remove weak references on display disposition
Weak references are added when logical monitors are created, however we
don't remove them when destroying the display.

This means that if a monitor survives to the display finalization
(because may be referenced elsewhere) it will make g-c-c to crash
during its finalization, as that will trigger the weak reference
callback that will try to access to the already-finalized display.
2022-04-24 12:21:14 +00:00
Georges Basile Stavracas Neto
e5a49dcf7b display: Return to main page after applying changes
After applying a change, it is useful to see the new state of the
monitors, so move back to the 'displays' page after applying.
2022-04-16 11:47:11 +00:00
Georges Basile Stavracas Neto
214dc277b5 display: Don't render background on selected monitors
In the previous design of this panel, it made sense to show the
currently selected monitor because all editing widgets were in
the same page. With the new design, however, the monitor options
were moved to a separate page, and that page already shows which
monitor is being edited.

Remove the colored background of selected monitors.
2022-04-16 11:47:11 +00:00
Georges Basile Stavracas Neto
ced1386fcd display: Update header title when setting output
Instead of updating the titlebar of the monitor preferences page in
the row clicked callback, update it in set_current_output(). This
ensures that the title of the page is always in sync with the monitor
it's displaying.
2022-04-16 11:47:11 +00:00
Alberts Muktupāvels
a581395221 display: fix monitor labels
has-toplevel-focus property has been removed from GTK 4:
0ce9f26dc5

https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1697
2022-03-18 22:08:49 +00:00
Yosef Or Boczko
5a7aa11b1e display: Force LTR to the spinbuttons's box 2022-02-28 09:47:53 +00:00
Georges Basile Stavracas Neto
dddd3f62c3 display: Box Night Light temperature vertically
Instead of being in the horizontal end of the row, move
the temperature scale to a second row.

Related: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1587
2022-02-15 19:35:18 +00:00
Georges Basile Stavracas Neto
8b05bc91d3 display: Remove labels from Night Light temperature scale
As per mockups.
2022-02-15 19:35:18 +00:00
Jakub Steiner
13376ecb8b Add individual app icons 2022-01-31 14:08:22 +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
Robert Mader
375bbc333c display: Always show refresh rate
Refresh rates are an important information for users, even if they
can't change them.
This is especially true for cases where knowledge of the refresh
rate may influence the decission about the resolution to use.
Consider the example where a display may support `3840x2160@60Hz`
and `2560x1440@144Hz`. When choosing `3840x2160` as resolution,
the refresh rate will likely get hidden, making the user unaware
of the fact that they will maybe not get what they want (potentially
144Hz).

So follow the example of e.g. the sound panel where input and output
devices are listed in dropdowns, even if they are the only options
selectable.

Note: while this is a design change, for a big group of users this
won't actually change the default experience as Mutter until recently
had a bug to duplicate 60Hz modes in many cases. So most laptop users
already saw the refresh rate panel in previous Gnome versions,
dispite it having little use.

See also:
fb9564b87b
2022-01-18 23:48:42 +01: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
1d6bab12cf display: Add enabled switch to CcDisplaySettings
This allow enabling and disabling each display individually.
2022-01-18 17:03:14 +00:00
Georges Basile Stavracas Neto
ec2632de92 display: Make CcDisplaySettings subclass GtkBox
We'll need more widgets under it soon.
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
67e8c7f5c6 display: Add monitor rows to display settings group
They allow selecting a monitor to config, and navigating to
the monitor settings 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