[applets/batterymonitor] BrightnessItem: Refactor Column into Layout

QtQuick.Layouts are easier to manage, and more flexible.
wilder-5.24
ivan tkachenko 4 years ago
parent 45a6f66387
commit a03eb300d3
No known key found for this signature in database
GPG Key ID: 4D197017E61437CF
  1. 8
      applets/batterymonitor/package/contents/ui/BrightnessItem.qml

@ -35,13 +35,13 @@ RowLayout {
Layout.preferredHeight: width
}
Column {
ColumnLayout {
Layout.fillWidth: true
Layout.alignment: Qt.AlignTop
spacing: 0
RowLayout {
width: parent.width
Layout.fillWidth: true
spacing: PlasmaCore.Units.smallSpacing
PlasmaComponents3.Label {
@ -51,14 +51,14 @@ RowLayout {
PlasmaComponents3.Label {
id: percent
horizontalAlignment: Text.AlignRight
Layout.alignment: Qt.AlignRight
text: i18nc("Placeholder is brightness percentage", "%1%", root.percentage)
}
}
PlasmaComponents3.Slider {
id: control
width: parent.width
Layout.fillWidth: true
// Don't allow the slider to turn off the screen
// Please see https://git.reviewboard.kde.org/r/122505/ for more information
from: to > 100 ? 1 : 0

Loading…
Cancel
Save