From 76e74d7660131ce8d10b7abc0dc4ee9b998d7e07 Mon Sep 17 00:00:00 2001 From: Ismael Asensio Date: Sat, 14 Aug 2021 03:28:11 +0200 Subject: [PATCH] [kcm/kwinrules] Adapt width to new breeze style spinboxes Also port from a stray `units` context property. --- src/kcmkwin/kwinrules/package/contents/ui/RulesEditor.qml | 4 ++-- src/kcmkwin/kwinrules/package/contents/ui/RulesList.qml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/kcmkwin/kwinrules/package/contents/ui/RulesEditor.qml b/src/kcmkwin/kwinrules/package/contents/ui/RulesEditor.qml index 5235e8604b..6b85d19bd8 100644 --- a/src/kcmkwin/kwinrules/package/contents/ui/RulesEditor.qml +++ b/src/kcmkwin/kwinrules/package/contents/ui/RulesEditor.qml @@ -59,7 +59,7 @@ ScrollViewKCM { Kirigami.PlaceholderMessage { id: hintArea anchors.centerIn: parent - width: parent.width - (units.largeSpacing * 4) + width: parent.width - (Kirigami.Units.largeSpacing * 4) text: i18n("No window properties changed") explanation: xi18nc("@info", "Click the Add Property... button below to add some window properties that will be affected by the rule") } @@ -107,7 +107,7 @@ ScrollViewKCM { QQC2.SpinBox { id: delaySpin enabled: detectButton.enabled - Layout.preferredWidth: Math.max(metricsInstant.advanceWidth, metricsAfter.advanceWidth) + Kirigami.Units.gridUnit * 2 + Layout.preferredWidth: Math.max(metricsInstant.advanceWidth, metricsAfter.advanceWidth) + Kirigami.Units.gridUnit * 4 from: 0 to: 30 textFromValue: (value, locale) => { diff --git a/src/kcmkwin/kwinrules/package/contents/ui/RulesList.qml b/src/kcmkwin/kwinrules/package/contents/ui/RulesList.qml index 5ecaaeb35c..c88740eb68 100644 --- a/src/kcmkwin/kwinrules/package/contents/ui/RulesList.qml +++ b/src/kcmkwin/kwinrules/package/contents/ui/RulesList.qml @@ -57,7 +57,7 @@ ScrollViewKCM { Kirigami.PlaceholderMessage { visible: ruleBookView.count === 0 anchors.centerIn: parent - width: parent.width - (units.largeSpacing * 4) + width: parent.width - (Kirigami.Units.largeSpacing * 4) text: i18n("No rules for specific windows are currently set"); explanation: xi18nc("@info", "Click the Add New... button below to add some") }