kcms/energy: Improve layout of the device selector
Port the device selector to an actual ListView instead of Row+Repeater combo, so we can use the implicit height of the delegate, instead of imposing a fixed height, which fails for bigger fonts.
While at it, fix some layout issues within the delegates and simplify the code by using the ListView regular properties to initialize and select the current device.
As an added benefit there is now keyboard navigation
BUG: 499290
BUG: 499350
FIXED-IN: 6.4
BEFORE | AFTER | |
---|---|---|
10pt | ![]() |
![]() |
14pt (+ Spanish label) |
![]() |
![]() |
Full of devices |
![]() |
![]() |
For testing I've been using bluetooth devices as secondary batteries, but I remember it requires some tweaking somewhere in the stack to get their batteries listed by upower.
Also not proposing for cherry-pick as the change is a bit invasive for after Beta2 (couldn't get it to work in less steps)
Edited by Ismael Asensio