D23368: [Energy KCM] Port away from WorkspaceComponents.BatteryIcon
Nathaniel Graham
noreply at phabricator.kde.org
Fri Aug 23 13:46:35 BST 2019
ngraham added inline comments.
INLINE COMMENTS
> broulik wrote in main.qml:156
> Can use the following
>
> var iconNameParts = ["battery"];
> // Round percentage to the nearest 10% and pad it with leading zeroes to match the icon names
> iconNameParts.push(String(Math.round(model.battery.chargePercent / 10) * 10).padStart(3, "0"));
> if (model.battery.chargeState === 1) { // charging
> iconNameParts.push("charging");
> }
> return iconNameParts.join("-");
My thought was that the battery level indicator inside the icon wasn't necessary because this UI has a current charge level indicator below the icon. Might be nice to show the plugged-in status though.
REPOSITORY
R102 KInfoCenter
REVISION DETAIL
https://phabricator.kde.org/D23368
To: ngraham, #plasma, broulik, meven
Cc: filipf, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190823/b72f795d/attachment.html>
More information about the Plasma-devel
mailing list