kcms/rules: Make the "Add Property" button non-toggleable

Changing the text and meaning of the button unexpectedly for a
regular operation is not consistent with any other place, and
disregarded by the HIG.

The sheet can be closed by tapping outside of it, or throught
the close button in its titlebar, as usual elsewhere.
This commit is contained in:
Ismael Asensio 2024-07-21 13:49:26 +02:00
parent 893bffd572
commit 9098fd4910

View file

@ -85,12 +85,10 @@ KCM.ScrollViewKCM {
footer: RowLayout { footer: RowLayout {
QQC2.Button { QQC2.Button {
text: checked ? i18n("Close") : i18n("Add Property...") text: i18n("Add Property...")
icon.name: checked ? "dialog-close" : "list-add" icon.name: "list-add"
checkable: true onClicked: {
checked: propertySheet.visible propertySheet.visible = true;
onToggled: {
propertySheet.visible = checked;
} }
} }
Item { Item {