applets/batterymonitor: Distinguish between sleep and screen locking

Following commit f9c81566 (MR !423 (merged)), we can show whether an inhibition is blocking just sleep or just screen locking, or both. We also now have stable sorting of application inhibitions, and got rid of the awkward "Block Temporarily" feature.

This MR uses the new API possibilities to make two user-visible changes:

  • Labels are rephrased to note what behaviors are blocked by inhibitions. The single line "Sleep and Screen Locking on Inactivity: Automatic/Blocked" is split up into two lines, one for Sleep and one for Screen Locking.
  • A second commit reverts back from the "Block"/"Unblock" buttons to the original switch UX, which was previously made impossible by the lack of stable sorting for application inhibitions but is now possible again. Comments following the introduction of per-app inhibition blocks were positive about the functionality, but lamented the loss of switches and their consistency with other Plasma applets that make extensive use of them.

BUG: 418433

Original screenshots below. See this comment further down for screenshots of the current revision.

Before: After first commit (label changes): After second commit (switches):
2025-12-24.inhibit-labels-before-1 2025-12-24.inhibit-labels-after-1 2025-12-24.inhibit-labels-switches-1
2025-12-24.inhibit-labels-before-2 2025-12-24.inhibit-labels-after-2 2025-12-24.inhibit-labels-switches-2
2025-12-24.inhibit-labels-before-3 2025-12-24.inhibit-labels-after-3 2025-12-24.inhibit-labels-switches-4
2025-12-24.inhibit-labels-before-4 2025-12-24.inhibit-labels-after-4 2025-12-24.inhibit-labels-switches-3

Bring on your strong opinions about UX and visual design. @nclarius @broulik @ngraham @teams/vdg

Edited by Jakob Petsovits

Merge request reports

Loading
Loading