The power management inhibition UI is currently somewhat confusing to
users because it's not clear that the checkbox is a local override for
the permanent settings set elsewhere in System Settings.
A good sign that the UI is sub-optimal is that we refer to it as "power
management inhibition" internally and in our developer conversations,
but the UI expresses the opposite: *allowing* power management, not
inhibiting it. This conflicts in the user's mind with the UI in System
Settings that is also expressed in terms of allowing it. It is further
confused by the fact that the message about apps suppressing power
management is phrased in terms of being an temporary override, and that
we also show an unrelated message about the battery charge limit (if set)
in the same place where we're notifying the user about power management
inhibition.
Let's clarify this UI by doing the following:
- Re-word the checkbox's label to emphasize that it's a local override
for the settings that were set elsewhere
- Move the charge level message into the battery item itself, since
that's what it affects
- Slightly re-word the message for when apps are inhibiting power
management to emphasize that power management can be inhibited
automatically by apps in additionto manually by the user
BUG: 435827
FIXED-IN: 5.22
This is generally what we do for other KCMs, and the UX is virtually
unchanged from the current multi-KCM dialog, with the exception of being
able to navigate elsewhere if you want.
BUG: 423761
FIXED-IN: 5.22
There's no point, since it always says "-" and just covers up the icon.
Let's only show the overlay if there are actually any batteries.
BUG: 435890
FIXED-IN: 5.22
We ported units to use the PlasmaCore.Units singleton earlier; now it's
time to do the same thing for PlasmaCore.Theme.
There are no UI changes or regressions detected.
The context property version is slower to access and won't be supported
in Qt6. Let's port away from it and use the singleton version instead.
Here was my full process for making this change:
1. Made the change with `find . -name '*.qml' | xargs perl -pi -e 's/units\./PlasmaCore\.Units\./g'`
2. Verified no more occurrences with `grep -r " units."`
3. Made sure this didn't change any comments in a silly way by inspecting the output of `git diff | grep "+ " | grep "//"`
4. Manually inspected the full git diff to make sure there were no other unintentional or silly changes (there were none)
5. verified that all changed files have the PlasmaCore import with the correct name with `for FILE in `git status | grep modified | cut -d ":" -f 3`; do grep -q "as PlasmaCore" $FILE || echo "$FILE needs the PlasmaCore import"; done`
Qt 5.15 introduced new syntax for defining Connections. Fix warnings like this one:
QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
the comboboix of a very rarely used feature right
in the header area is super noisy, looks misaligned and puts the feature
in a too much prominent role.
Put everything under a popup menu, mustually exclusive actions will be
shown as radiobuttons
At the moment, in the battery widget, the slider displays the brightness of the screen, but
it doesn't have text labels, so it's quite difficult to determine the brightness of the
screen. Adding a label over the slider that will display the current screen brightness as a
percentage will make this applet more descriptive and handy.
Right now this functionality is only offered through the context menu,
which of course is not available on touch. This commit adds a simple
toolbutton in the applet's toolbar to show the Energy KCM.
Right now we handle the "plugged in but not charging" state but not the
state where you're plugged in but the power supply doesn't supply enough
power to prevent discharging anyway. We can wiggle the logic around to
catch this case with the existing one for the "plugged in and not
charging" state.
--Battery monitor in compact representation must align
its battery icon/s in center. That was first noticed
by a user in some systray cases.
BUG: 421038
This patch improves the UI for inhibiting power management and seeing
which apps are automatically doing it. Here are the changes, explained:
1. Use less jargonistic terminology for the feature itself, and remove
the explanatory tooltip which is no longer necessary
2. Show the full list of apps which are inhibiting power management,
because we have the space now that app icons are smaller
3. Correctly show and hide the list of inhibitions based on count and
Whether or not the user has independently suppressed PM
4. Leave a bit more room for long reasons and alert translators to
minimize string length as much as possible
BUG: 401108
FIXED-IN: 5.20.0
Summary:
Otherwise we're discarding style information possibly set in
the user's small font choices when we want to set a smaller
font.
Test Plan: Stuff that's suposta look small still looks small
Reviewers: cblack, #plasma
Reviewed By: cblack, #plasma
Subscribers: ahiemstra, apol, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D29437
Summary:
CCBUG: 417836
Depends on D29711
As this will depend on Frameworks 5.71, it will be landed on master after branching,
ending up in Plasma 5.20.
Test Plan:
Right-click on applets and activate their configure menu items
Open applets and click on their settings buttons
Observe that the KCMs are opened in System Settings or Info Center
(depending on the context)
Reviewers: mart, #plasma
Reviewed By: mart, #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D29712
It only had a return value for "NoCharge" since the else case was only for not plugged in, resulting in it effectively returning undefined,
throwing during assignment "cannot assign [undefined] to string" and leaving whatever text happened to be shown last.
BUG: 420920
Differential Revision: https://phabricator.kde.org/D29633
Summary:
I probably introduced the issue fixed here with D29315, sorry. This patch makes the
parent layout invisible when all of its children are invisible, so it doesn't keep
taking up some vertical space after a previously-visible inhibition goes away.
Test Plan: When an inhibition goes away, it once again looks like it should: {F8288112}
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D29467
Summary:
This makes it take up less vertical space in the header area and also match the similar
message in the notifications applet.
Test Plan: {F8274308}
Reviewers: #vdg, #plasma, broulik, manueljlin, mart
Reviewed By: #vdg, #plasma, mart
Subscribers: plasma-devel
Tags: #plasma
Maniphest Tasks: T10470
Differential Revision: https://phabricator.kde.org/D29315
Summary:
This patch implements part of the mockup at T10470 by putting the power management
checkbox and settings button in a heading area visually connected to the titlebar.
In the process, I fixed a problem with the power management checkbox to make the layout's
spacing work: the checkbox now has text of its own, instead of living in a mouse area
with a separate label.
Test Plan:
{F8254807}
{F8254808}
Reviewers: #vdg, #plasma, broulik, niccolove, manueljlin
Reviewed By: #vdg, manueljlin
Subscribers: plasma-devel
Tags: #plasma
Maniphest Tasks: T10470
Differential Revision: https://phabricator.kde.org/D29116
Summary:
Currently the applet uses the main line in tooltip to display all info. Instead it should show always the same first line like other widgets and use the second line to show info.
BUG: 411973
FIXED-IN: 5.19.0
Test Plan:
The point of this patch is to make the tooltip more like the style used in the Audio Volume applet:
{F7862465}
Other "after" images:
{F7862461}
{F7862463}
{F7862464}
{F7871067}
Reviewers: #vdg, #plasma, broulik, ndavis, mthw
Reviewed By: #vdg, #plasma, broulik, ndavis, mthw
Subscribers: GB_2, ndavis, broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D24070
Summary: With other two patches, this aims to make leftMargin consistent in widgets (See https://phabricator.kde.org/D26945 and https://phabricator.kde.org/D26944)
Test Plan:
System tray
Before:
{F7977382}
After:
{F7977379}
Notifications
Before:
{F7977359}
After:
{F7977357}
Battery monitor
Before:
{F7977362}
After:
{F7977361}
Self reminder: networkmanager is still slightly badly aligned
Reviewers: #vdg, #plasma, ngraham
Reviewed By: #vdg, ngraham
Subscribers: gvgeo, ngraham, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D26946
Especially when you're almost out of juice you don't want to be wasting it blinking an icon causing excess repaints.
Also considering the critical percentage is hardcoded to 5% here and doesn't follow PowerDevil's setting.
Given battery critical notification is persistent and always on top of everything these days,
you can't really miss the fact that you're almost ouf of power.
Differential Revision: https://phabricator.kde.org/D26434
Summary:
Use QQC2.Slider, so that we have a moved signal. This way we can only
issue new brightnesses when the user actually interacts with it.
Don't adapt to the system brightness until we have finished interacting
with it.
Test Plan:
Manual testing, flickering is very much reduced both when scrolling over the
compact plasmoid as well as the slider.
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D26035
Summary:
After the change to "Capacity degradation" was announced on
https://pointieststick.com/2019/08/24/kde-usability-productivity-week-85/, it turned out
that nobody could understand the new string either. :(
This patch changes it to something much clearer: suggested by a user: "Battery health".
This string has the advantage that it does not require knowing that batteries degrade,
and uses the same percentage scale as other operating systems.
Test Plan: {F7279584, size=full}
Reviewers: #vdg, #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, aspotashev, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D23448
Summary:
Companion patch to D23270
The same logic explained in D23270 applies here: using the text "Capacity degradation"
is much clearer than "capacity" when referring to how much of the battery's original
capacity is remaining due to degradation.
Test Plan: {F7264994, size=full}
Reviewers: #vdg, broulik, #plasma, filipf
Reviewed By: #vdg, broulik, #plasma, filipf
Subscribers: aspotashev, filipf, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D23271
Summary:
Retry after D23237
Vendor and Product will be shown in the energy information kcm after D23152
Test Plan:
After:
{F7260208}
Reviewers: #vdg, #plasma, broulik, ngraham
Reviewed By: #vdg, #plasma, broulik, ngraham
Subscribers: ngraham, alexde, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D23260
Summary:
As there are only a few QML files in the respective /ui subdir, having the
JS file in the same dir still provides good overview
Test Plan: Applets UI & Config still work as before
Reviewers: #plasma, mart, broulik, apol
Reviewed By: apol
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D11145
Summary:
BUG: 345940
Move the "Enable Power Management" checkbox to the top of the window to match other applets (bluetooth, network)
Reviewers: #plasma_workspaces, broulik, mck182, davidedmundson, mart
Reviewed By: #plasma_workspaces, davidedmundson, mart
Subscribers: mart, jensreuterberg, davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D8607
Summary:
This was tricky bug to track down, needed to add debug statements in
literally every functions.
The flow of events is something like this, At startup:
- We don't have information about actual brightness for few seconds
- In this period, brightness slider have default value of 1
- This triggers the function which sets batterymonitor.screenBrightness
- onScreenBrightnessChanged gets called, which sets the actual
brightness
- onScreenBrightnessChanged have a guard for disableBrightnessUpdate but
since we have it marked as false initially, we proceed to set actual
brightness to 1
- However before we set value of brightness to 1, we do get actual
brightness back from dataengine, and our call overrides it to 1 later.
- On desktop we do get 2nd dataChanged event from somewhere, so
brightness is proper, but on mobile that is not case and results in
brightness staying at 1.
To fix this bug, we set disableBrightnessUpdate true at startup, and
when there is actual brightness change from powerdevil or
powermanagement engine, Logic.js takes care of enabling and disabling
brightness change.
(I quite like the boolean trap there in variable name :P .. will fix in
another change in master)
Test Plan:
Tested on desktop and mobile, verified that
- Brightness keys work
- Brightness slider works
- Scroll to change brightness works
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D8462
In QtQuick Layouts implicit size, which is taken from the SVG's preferred size, takes
precedence potentially destroying the layout.
Also, it should have been medium to be consistent with the rest.
BUG: 383213
FIXED-IN: 5.8.8
Summary:
This makes it possible to have some more fine-grained control over
the screen brightness with scroll devices that support it, like
touchpads or trackpoints.
Test Plan: Tested with touchpad, trackpoint and scroll wheel on mouse
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D5025
Summary:
if there is no battery don't show 0%, but a - on
the badge. still show the badge to show the option is not broken,
but don't show a weird 0% of a non existing battery
Test Plan: works on both systems with or without battery
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: broulik, davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D4606