diff --git a/src/kcmkwin/kwinrules/package/contents/ui/RulesEditor.qml b/src/kcmkwin/kwinrules/package/contents/ui/RulesEditor.qml
index 9521e0a86f..c10d592f36 100644
--- a/src/kcmkwin/kwinrules/package/contents/ui/RulesEditor.qml
+++ b/src/kcmkwin/kwinrules/package/contents/ui/RulesEditor.qml
@@ -44,25 +44,24 @@ ScrollViewKCM {
NumberAnimation { property: "y"; duration: Kirigami.Units.longDuration }
}
- Kirigami.PlaceholderMessage {
- id: hintArea
- visible: rulesView.count <= 4
+ // We need to center on the free space below contentItem, not the full
+ // ListView. This invisible item helps make that positioning work no
+ // matter the window height
+ Item {
anchors {
- // We need to center on the free space below contentItem, not the full ListView.
- // Setting both top and bottom anchors (or using anchors.fill) stretches the component
- // and distorts the spacing between its internal items.
- // This is fine as long as we have a single item here.
- horizontalCenter: parent.horizontalCenter
+ left: parent.left
+ right: parent.right
top: parent.contentItem.bottom
bottom: parent.bottom
}
- width: parent.width - (units.largeSpacing * 4)
- helpfulAction: QQC2.Action {
- text: i18n("Add Property...")
- icon.name: "list-add-symbolic"
- onTriggered: {
- propertySheet.open();
- }
+ visible: rulesView.count <= 4
+
+ Kirigami.PlaceholderMessage {
+ id: hintArea
+ anchors.centerIn: parent
+ width: parent.width - (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")
}
}
}
@@ -87,7 +86,6 @@ ScrollViewKCM {
icon.name: checked ? "dialog-close" : "list-add-symbolic"
checkable: true
checked: propertySheet.sheetOpen
- visible: !hintArea.visible || checked
onToggled: {
propertySheet.sheetOpen = checked;
}
diff --git a/src/kcmkwin/kwinrules/package/contents/ui/RulesList.qml b/src/kcmkwin/kwinrules/package/contents/ui/RulesList.qml
index d51ca2e6bb..5ecaaeb35c 100644
--- a/src/kcmkwin/kwinrules/package/contents/ui/RulesList.qml
+++ b/src/kcmkwin/kwinrules/package/contents/ui/RulesList.qml
@@ -59,6 +59,7 @@ ScrollViewKCM {
anchors.centerIn: parent
width: parent.width - (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")
}
}