[applets/batterymonitor] PowerProfileItem: Elide slider labels

There are many languages (including Russian) where three three power
profile titles do take much more space than it is available in applet.
RowLayout's spacing ensures they do not stick to each other side by
side.

Ideally, we should have "shrinking labels" which are capable of
adjusting their text's kerning based on available space. In the
meantime, localization teams are advised to use as short profile names
as possible without loosing their meaning.
wilder-5.24
ivan tkachenko 4 years ago
parent 7b39edb288
commit 245af4da15
No known key found for this signature in database
GPG Key ID: 4D197017E61437CF
  1. 3
      applets/batterymonitor/package/contents/ui/PowerProfileItem.qml

@ -104,8 +104,8 @@ RowLayout {
RowLayout {
Layout.fillWidth: true
spacing: PlasmaCore.Units.smallSpacing
spacing: 0
Repeater {
id: repeater
model: root.profileData
@ -121,6 +121,7 @@ RowLayout {
default:
return Text.AlignHCenter; // middle
}
elide: Text.ElideMiddle
// Disable label for inhibited items to reinforce unavailability
enabled: !(root.profileData[index].canBeInhibited && root.inhibited)

Loading…
Cancel
Save