Fix QML: MouseArea dentro Kirigami.Icon (anchor non valido) - area cliccabile dell'icona di pannello

This commit is contained in:
enne2
2026-09-25 16:16:53 +02:00
parent c896b51455
commit 65b854bfd1
+11 -11
View File
@@ -276,6 +276,17 @@ PlasmoidItem {
source: root.active ? root.iconOnPath : root.iconOffPath
implicitWidth: Kirigami.Units.iconSizes.smallMedium
implicitHeight: Kirigami.Units.iconSizes.smallMedium
// Kirigami.Icon può assorbire i clic (bug KDE 518024):
// area cliccabile direttamente sopra l'icona.
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.LeftButton | Qt.MiddleButton
cursorShape: Qt.PointingHandCursor
onClicked: function(mouse) {
root.handleCompactClick(mouse.button)
}
}
}
PlasmaComponents3.Label {
@@ -294,17 +305,6 @@ PlasmoidItem {
root.handleCompactClick(mouse.button)
}
}
// Kirigami.Icon può assorbire i clic (bug KDE 518024): seconda area
// cliccabile sopra l'icona, con la stessa azione.
MouseArea {
anchors.fill: compactIcon
acceptedButtons: Qt.LeftButton | Qt.MiddleButton
cursorShape: Qt.PointingHandCursor
onClicked: function(mouse) {
root.handleCompactClick(mouse.button)
}
}
}
// --------------------------------------------------------------- popup opzioni