summaryrefslogtreecommitdiffstats
path: root/demos/declarative/webbrowser/content/Button.qml
diff options
context:
space:
mode:
Diffstat (limited to 'demos/declarative/webbrowser/content/Button.qml')
-rw-r--r--demos/declarative/webbrowser/content/Button.qml10
1 files changed, 8 insertions, 2 deletions
diff --git a/demos/declarative/webbrowser/content/Button.qml b/demos/declarative/webbrowser/content/Button.qml
index 4642cc7fcb..2a2e7ef50e 100644
--- a/demos/declarative/webbrowser/content/Button.qml
+++ b/demos/declarative/webbrowser/content/Button.qml
@@ -45,15 +45,21 @@ Item {
property alias image: icon.source
property variant action
+ signal clicked
+
width: 40; height: parent.height
Image {
id: icon; anchors.centerIn: parent
- opacity: if(action != undefined) {action.enabled ? 1.0 : 0.4} else 0
+ opacity: if (action != undefined) { action.enabled ? 1.0 : 0.4 } else 1
}
MouseArea {
anchors { fill: parent; topMargin: -10; bottomMargin: -10 }
- onClicked: action.trigger()
+ onClicked: {
+ if (action != undefined)
+ action.trigger()
+ parent.clicked()
+ }
}
}