Make more of the device name/battery show up in the plasmoid

This commit is contained in:
Matthijs Tijink 2019-06-25 16:40:10 +00:00
parent d712dbbd40
commit f8184f84bc

View file

@ -72,18 +72,12 @@ PlasmaComponents.ListItem
RowLayout RowLayout
{ {
Item {
//spacer to make the label centre aligned in a row yet still elide and everything
implicitWidth: (ring.visible? ring.width : 0) + (browse.visible? browse.width : 0) + (shareFile.visible? shareFile.width : 0) + parent.spacing
}
Battery { Battery {
id: battery id: battery
device: root.device device: root.device
} }
PlasmaComponents.Label { PlasmaComponents.Label {
horizontalAlignment: Text.AlignHCenter
elide: Text.ElideRight elide: Text.ElideRight
text: (battery.available && battery.charge > -1) ? i18n("%1 (%2)", display, battery.displayString) : display text: (battery.available && battery.charge > -1) ? i18n("%1 (%2)", display, battery.displayString) : display
Layout.fillWidth: true Layout.fillWidth: true