Cleanup buttons

Mostly removing the usage of the action property, since there's no point in using it. Also add some translation contexts and some other minor cleanup
This commit is contained in:
Tobias Fella
2025-08-13 17:34:08 +02:00
committed by Tobias Fella
parent 9b763daf52
commit 45b02ae34e
12 changed files with 235 additions and 271 deletions

View File

@@ -271,16 +271,13 @@ FormCard.FormCardPage {
QQC2.ToolButton {
visible: root.room.canSendState("m.space.parent") && root.room.canonicalParent !== officalParentDelegate.modelData
display: QQC2.AbstractButton.IconOnly
action: Kirigami.Action {
id: canonicalParentAction
text: i18n("Make canonical parent")
icon.name: "checkmark"
onTriggered: root.room.canonicalParent = officalParentDelegate.modelData
}
QQC2.ToolTip {
text: canonicalParentAction.text
delay: Kirigami.Units.toolTipDelay
}
text: i18nc("@action:button", "Make canonical parent")
icon.name: "checkmark"
onClicked: root.room.canonicalParent = officalParentDelegate.modelData
QQC2.ToolTip.text: text
QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
QQC2.ToolTip.visible: hovered
}
QQC2.ToolButton {
visible: officalParentDelegate?.space.canSendState("m.space.child") && root.room.canSendState("m.space.parent")