Commit 37445d9c authored by Nate Graham's avatar Nate Graham
Browse files

[kcmkwin/kwinrules] Add explanatory text to placeholder messages

parent ca23bca8
......@@ -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 <interface>Add Property...</interface> 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;
}
......
......@@ -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 <interface>Add New...</interface> button below to add some")
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment