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

Loading…
Cancel
Save