Commit graph

55 commits

Author SHA1 Message Date
Felipe Borges
0042c11747 power: Use adw_dialog_present directly to show Auto suspend dialog 2024-04-09 11:37:37 +02:00
Automeris naranja
a7017238a5 power: Remove content-height property in the "Automatic Suspend" dialog
Doing so, this dialog won't display a scrollbar that scrolls
just a little bit, as this is unnecessary.
2024-04-08 13:48:23 +00:00
Automeris naranja
7b039bb279 power: Minor tweaks to strings related to automatic suspend
Rename the following strings (and use header capitalization):
- "When on battery power" to "On Battery Power"
- "When plugged in" to "When Plugged In" (in the Automatic Suspend
dialog too)

Reference 1bb482ed19
2024-04-07 21:19:28 +00:00
Automeris naranja
96d4acf1ed power: Port "Automatic Suspend" dialog to AdwDialog 2024-04-03 08:33:05 +00:00
silver
f694945b6e power: Add some more reasonable suspend time options for mobile
Edited by felipeborges.
2024-03-21 16:01:11 +00:00
Automeris naranja
cb8819657b general: Rename "computer" strings to "device"
"Computer" isn't a suitable term for other device
form factors. Also, there are several strings in
Settings that already use "device", and cc-color-panel.ui
uses a mix of "computer" and "device" strings, which is
weird.
2024-03-11 15:19:55 +00:00
Automeris naranja
95f36e2d71 power: Remove row-activated callback for power profile rows
It isn't necessary anymore now that power profile
rows are AdwActionRows[1].

[1] f7b41b23f5
2024-02-26 15:56:41 +00:00
Automeris naranja
2b2af85ead power: Port "Automatic Suspend" row to CCListRow
This helps to clean the code a bit.
2024-02-20 10:05:15 +00:00
Automeris naranja
5785f4cc7d power: Don't use GtkSizeGroup
This isn't being used in other panels; it also
increases the height of all rows when the
window is narrow, making the UI to look odd.

Closes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1674
2024-02-20 08:51:52 +00:00
Jeremy Bícha
80b02fdb97 power: Use imperative verb tense
This verb style commonly known as "imperative" is simpler without
the trailing "s" and better matches the style used elsewhere
2024-02-12 09:17:48 +00:00
Monster
47c7f2d216 power: Remove periods in subtitles 2024-02-05 10:52:19 +00:00
Hari Rana
a936ac6bc9 power-panel: Port to AdwSwitchRow 2024-01-18 13:28:54 +00:00
Automeris naranja
760f605bbb power: Add missing mnemonics in the automatic suspend dialog 2024-01-08 09:42:04 +00:00
Hari Rana
a00a0fe3fd automatic-suspend-dialog: Use AdwPreferencesPage
The GtkScrolledWindow-AdwClamp-GtkBox combo would cause the dialog to horizontally move when the user resizes it to its minimum width. Furthermore, the AdwClamp used in the window wasn't using its `child` property. The dialog looks identical.
2024-01-02 15:20:47 +00:00
Maximiliano Sandoval R
ae33a67be0 power-panel: Modernize suspend dialog
We make the dialog adaptive. Unfortunately for it to be trully modern a
AdwComboRow should be used instead of a GtkComboBox.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/2001>
2023-11-07 08:53:08 +00:00
Automeris naranja
46239939ed power: Add missing mnemonics
Add mnemonics to the following rows
- Dim Screen
- Automatic Screen Brightness
- Automatic Power Saver

Partially fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2541
2023-11-05 17:39:31 -03:00
Allan Day
a75cdb2c46 power: Adjust section titles
Use the section titles from the latest mockups. Also remove the unused
title from the .ui file.
2023-10-23 14:04:22 +00:00
Alice Mikhaylenko
4680f362f3 Port to AdwNavigationSplitView 2023-08-25 08:00:43 +00:00
Alice Mikhaylenko
1032ab01f0 power: Port the suspend dialog to AdwWindow and AdwToolbarView 2023-08-25 08:00:43 +00:00
Alice Mikhaylenko
0921015b8b power: Port to AdwToolbarView 2023-08-25 08:00:43 +00:00
Felipe Borges
fc9251c880 Revert "cc-power-panel: add battery health section"
This reverts commit 4a0d924afd.

There are some rough edges to be polished before this is ready for
prime time.

UPower battery health capacity reporting can often be inconsistent
across vendors, and we don't want to expose unreliable information
on the UI without proper sanitization.
2023-08-07 12:18:33 +02:00
Eric Daigle
4a0d924afd cc-power-panel: add battery health section
As described in #2554, it would be useful to be able to see battery health information
such as charge capacity in Settings. This commit implements the proposed design for
battery health information, adding this functionality to the power panel.

Closes #2554
2023-08-04 09:40:07 +00:00
sunflowerskater
7366eee9ee power: Show a description for Battery Percentage switch
Battery Percentage switch don't offer a description explaining where the percentage will be shown.

This commit adds a description to better explain what this option does.

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1641
2022-12-15 16:24:05 -03:00
Felipe Borges
3a31e34514 power: Fix "Power Button Behavior" setting now applying
The AdwComboRow widget has a selected-item property, while we were
connecting to selected-index (which doesn't exist.

It is likely that selected-index existed in the past in libhandy
or libadwaita and this is a regression during the port to GTK4.

Fixes #2025
2022-08-23 15:26:46 +00:00
Felipe Borges
37f5cbe6af power: Fix blank-screen settings not applying
The AdwComboRow widget has a selected-item property, while we were
connecting to selected-index (which doesn't exist.

It is likely that selected-index existed in the past in libhandy
or libadwaita and this is a regression during the port to GTK4.

Fixes #2025
2022-08-23 15:26:46 +00:00
Lukáš Tyrychtr
de8d28c3eb Improve accessibility of the power panel 2022-05-10 22:14:35 +00:00
Georges Basile Stavracas Neto
07e3f5c3f3 power: Add go-next-symbolic icon to automatic suspend row
See https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1587
2022-01-21 16:13:21 +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
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
a0d49cb3a8 power: Port to GTK4
Extra care was needed for the combo boxes, and the way we currently
use GtkStringList is kind of hacky, but overall things seem to be
working fine.
2021-12-14 22:34:21 -03:00
Bastien Nocera
dafbd54fe0 power: Update and add subtitle to automatic brightness row
As per:
https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1020#note_1210702
2021-07-28 11:55:34 +00:00
Bastien Nocera
bb30b04ed6 power: Remove Brightness scales
From https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1020#note_1211728
"
They are out of place - fine-grained control over brightness isn't what the
power settings are for. As a result, they confuse the settings overall.

In both cases we have alternative controls, through keyboard hot keys or
through the shell's screen brightness slider.
"
2021-07-28 11:55:34 +00:00
Bastien Nocera
fd53f569f1 power: Tweak labels in "Power Saving Options" section
To match the latest mockups.

The lack of subtitles for most of the items in that section made the
section look pretty bizarre.
2021-07-28 11:55:34 +00:00
Bastien Nocera
f03cf178dd power: Remove Bluetooth power switch button
See previous commit.
2021-07-28 11:55:34 +00:00
Bastien Nocera
2f2ea3aed6 power: Remove Wi-Fi and WWAN "power saving" toggles
It's pretty clear from their experiences on smartphones that our users
know that Wi-Fi and other wireless technologies use enough battery that
turning them off is a power saving move.

The switches and text were also pretty confusing as we would be turning
"off" the devices to turn "on" the power saving.
2021-07-28 11:55:34 +00:00
Bastien Nocera
1144db552e power: Add UI for "power-saver profile when battery is low"
See https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/merge_requests/247
2021-07-26 18:53:20 +02:00
Bastien Nocera
9724d3ef59 power: Handle new power-profiles-daemon API
Handle the new PerformanceDegraded property to replace
PerformanceInhibited.
2021-07-15 22:14:06 +02:00
Adrien Plazas
a75a0f0384 power: Fix the indentation
The indentation was purposefully left incorrect in the previous commits
to ease the review of the actual changes, this fixes it.
2021-05-07 02:50:40 +00:00
Adrien Plazas
a5c0934b4d power: Use HdyPreferencesGroup 2021-05-07 02:50:40 +00:00
Adrien Plazas
6c8307faf4 power: Use HdyActionRow to simplify the code 2021-05-07 02:50:40 +00:00
Adrien Plazas
4cc4b91b4e power: Use HdyComboRow for the Power Button Behavior row
This simplifies the code a bit and modernizes the UI.
2021-05-07 02:50:40 +00:00
Adrien Plazas
3069dc84c8 power: Use HdyComboRow for the Blank Screen row
This simplifies the code a bit and modernizes the UI.
2021-05-07 02:50:40 +00:00
Adrien Plazas
f986fedf49 power: Don't set the vadjustment
This is useless as GtkScrolledwindow already does it on the viewport it
creates.
2021-05-07 02:50:40 +00:00
Robert Ancell
fd33f80558 power: Move general UI into GtkBuilder file 2020-12-13 20:57:04 +00:00
Robert Ancell
2cd571f2f7 power: Move power saving UI into GtkBuilder file 2020-12-13 20:57:04 +00:00
Robert Ancell
b539a2d94f power: Move power profile UI into GtkBuilder file 2020-12-13 20:57:04 +00:00
Robert Ancell
1d11ba552d power: Move device UI into GtkBuilder file 2020-12-13 20:57:04 +00:00
Robert Ancell
3bd01516e3 power: Move battery UI into GtkBuilder file 2020-12-13 20:57:04 +00:00
Robert Ancell
cd24fddcf8 power: Move GtkSizeGroups into GtkBuilder file 2020-12-13 20:57:04 +00:00
Robert Ancell
d06375fc82 power: Use GTK widget types 2020-12-13 20:57:04 +00:00