Commit graph

29 commits

Author SHA1 Message Date
Automeris naranja
74c183f3f4 display, night-light: Remove "infobar_unsupported" leftover
"infobar_unsupported" GtkInfoBar was supposed to be removed
in [1], but was accidentally re-added during the code review.

[1] 909f068672
2024-04-29 08:55:13 +00:00
Automeris naranja
909f068672 display, night-light: Use AdwStatusPage when night light is unavailable
Night light can be unavailable in three cases:

- Device being used remotely
- Unsupported graphics driver
- Using a virtual machine

In all of these cases, a GtkInfoBar is shown. However, GtkInfoBar is
deprecated. AdwBanner is the replacement, but it's meant for short
text and the text explaining the three cases above is quite long for
AdwBanner. AdwStatusPage can be used with longer text, so use it.
2024-04-25 10:32:18 +02:00
Automeris naranja
a02b47dadf night-light-page: Move page description to AdwPreferencesPage
The page description is inside an AdwPreferencesGroup,
which is wrong.
2024-02-21 08:34:38 +00:00
Hari Rana
afc690cb74 night-light-page: Port to AdwSwitchRow 2024-01-08 09:57:13 +00:00
Automeris naranja
f588b1ce3f night-light-page: Add missing mnemonics
Partially fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2541
2023-11-27 09:51:46 +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
Robert Ancell
f756184e3b display: Do signal handlers in swapped form 2023-05-30 08:36:22 +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
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
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
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
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
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
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
Christopher Davis
981a8cea7b panels: Use .boxed-list instead of .content
The `.content` style class is deprecated in favor
of the `.boxed-list` style class, which is named
after the design pattern it's used for.
2021-12-16 12:52:44 -08:00
Georges Basile Stavracas Neto
f598fb3ed6 display: Port to GTK4 2021-12-14 22:34:21 -03:00
Adrien Plazas
0c71793e7c Stop using the action HdyActionRow child type
It has been dropped and is now the default child type.
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
Mohammed Sadiq
af76f51976 display: Reduce some margins in night light page
So that the display panel can reach smaller widths
2019-11-06 17:12:27 +00:00
Benjamin Berg
ca684c2a7c display: Update night light scale to new blackbody calculation
g-s-d was changed to use a better black body temperature calculation.
This strongly affects the effect of the color temperature (the default
is changed from 4000K to 2700K). Update the scale to represent a similar
range to default even if the distribution on the scale is quite
different.
2019-07-30 10:47:36 +02:00
Allan Day
3d9649577a display: improve time widget spacing
It's good to have some space between the to and from widgets, so
they aren't squashed, and so they blend better with the colour
temperature slider below.

Ideally we'd just increase the space between the to and from
sections, and not also between the widgets and their labels, but
the approach in this commit isn't too bad.
2019-06-17 11:44:06 +01:00
Allan Day
c8c6d51fd0 display: Improve Night Light settings labels
Make sure that the labels in the night settings are clear.

Fixes #583
2019-06-17 11:41:26 +01:00
Georges Basile Stavracas Neto
28b0acb24e display: Rework Night Light page
The new Night Light page, as described by the latest mockups [1],
uses a listbox to display the options. Also, there is a small
revamp on how the disabled state is handled; it now is a switch
in a row, instead of an extra radio button.

This commit changes the Night Light page to have a listbox, and
uses libhandy's rows to achieve the desired interface.

Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/issues/533
2019-06-16 01:01:36 +00:00
Georges Basile Stavracas Neto
b46aef0cb6 display: Make night light dialog a GtkBin
And create the dialog manually instead. The next commit
will move it to a different page in the panel itself,
so not much care was put into makin the dialog perfectly
matching.

https://gitlab.gnome.org/GNOME/gnome-control-center/issues/533
2019-06-16 01:01:36 +00:00