diff options
Diffstat (limited to 'desktop/Button.qml')
| -rw-r--r-- | desktop/Button.qml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/desktop/Button.qml b/desktop/Button.qml index b93a926..6a977fa 100644 --- a/desktop/Button.qml +++ b/desktop/Button.qml @@ -17,7 +17,9 @@ Rectangle { property alias font: label.font property bool danger: false property bool enabled: true - signal clicked + // The mouse event, for a caller that reads modifiers; a handler that + // takes no argument ignores it. + signal clicked(var mouse) implicitWidth: label.implicitWidth + 22 implicitHeight: label.implicitHeight + 12 @@ -44,6 +46,6 @@ Rectangle { anchors.fill: parent hoverEnabled: true cursorShape: btn.enabled ? Qt.PointingHandCursor : Qt.ArrowCursor - onClicked: if (btn.enabled) btn.clicked() + onClicked: mouse => { if (btn.enabled) btn.clicked(mouse); } } } |
