From a03eb300d3b2f886fb49d02c6e3c17d764bcfda0 Mon Sep 17 00:00:00 2001 From: ivan tkachenko Date: Thu, 16 Dec 2021 17:02:13 +0300 Subject: [PATCH] [applets/batterymonitor] BrightnessItem: Refactor Column into Layout QtQuick.Layouts are easier to manage, and more flexible. --- .../batterymonitor/package/contents/ui/BrightnessItem.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/applets/batterymonitor/package/contents/ui/BrightnessItem.qml b/applets/batterymonitor/package/contents/ui/BrightnessItem.qml index 9d3cfd1f0..023adf782 100644 --- a/applets/batterymonitor/package/contents/ui/BrightnessItem.qml +++ b/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