Fix QML: MouseArea dentro Kirigami.Icon (anchor non valido) - area cliccabile dell'icona di pannello
This commit is contained in:
+11
-11
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user