summaryrefslogtreecommitdiff
path: root/components/custom/BasicButton.qml
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-11-02 13:10:37 +0100
committerSamuel Rødal <samuel.rodal@nokia.com>2011-11-02 13:11:10 +0100
commit7855aaff6271c7544b68e31d744443bfdeb92e96 (patch)
treefad5fb5d7853914c7731327783ad0085e02aece6 /components/custom/BasicButton.qml
parent8b27785d0f33c2f4f33768e5ecf6293480d047f3 (diff)
parent0959b13bd88fe195d0715820c750c3e5c8ba8fb1 (diff)
downloadqtquickcontrols-7855aaff6271c7544b68e31d744443bfdeb92e96.tar.gz
Attempted merge of origin/master
Prepare for borkenness Reviewed-by: Jens Reviewed-by: Tor Arne Conflicts: components/Button.qml components/ButtonRow.qml components/CheckBox.qml components/ChoiceList.qml components/ContextMenu.qml components/Dial.qml components/Frame.qml components/GroupBox.qml components/ProgressBar.qml components/RadioButton.qml components/ScrollArea.qml components/ScrollBar.qml components/Slider.qml components/SpinBox.qml components/Switch.qml components/Tab.qml components/TabBar.qml components/TabFrame.qml components/TableColumn.qml components/TableView.qml components/TextArea.qml components/TextField.qml components/ToolBar.qml components/ToolButton.qml components/custom/BasicButton.qml components/custom/Button.qml components/custom/CheckBox.qml components/custom/ChoiceList.qml components/custom/GroupBox.qml components/custom/ProgressBar.qml components/custom/Slider.qml components/custom/SpinBox.qml components/custom/TextField.qml components/custom/behaviors/ButtonBehavior.qml components/custom/behaviors/ModalPopupBehavior.qml components/custom/private/ChoiceListPopup.qml examples/Gallery.qml src/qstyleitem.cpp src/qtmenuitem.h src/qtoplevelwindow.cpp src/qwheelarea.h src/qwindowitem.cpp src/styleitem/qwheelarea.cpp src/styleitem/styleitem.pro
Diffstat (limited to 'components/custom/BasicButton.qml')
-rw-r--r--components/custom/BasicButton.qml18
1 files changed, 15 insertions, 3 deletions
diff --git a/components/custom/BasicButton.qml b/components/custom/BasicButton.qml
index 2a840121..572e8130 100644
--- a/components/custom/BasicButton.qml
+++ b/components/custom/BasicButton.qml
@@ -9,12 +9,12 @@ Item {
property alias containsMouse: behavior.containsMouse
property alias checkable: behavior.checkable // button toggles between checked and !checked
property alias checked: behavior.checked
+ property bool activeFocusOnPress: false
property Component background: null
property Item backgroundItem: backgroundLoader.item
property color textColor: syspal.text;
- property bool activeFocusOnPress: false
property string tooltip
signal toolTipTriggered
@@ -22,8 +22,20 @@ Item {
// implementation
property string __position: "only"
- width: backgroundLoader.item.width
- height: backgroundLoader.item.height
+ implicitWidth: backgroundLoader.item.width
+ implicitHeight: backgroundLoader.item.height
+
+ function animateClick() {
+ behavior.pressed = true
+ behavior.clicked()
+ animateClickTimer.start()
+ }
+
+ Timer {
+ id: animateClickTimer
+ interval: 250
+ onTriggered: behavior.pressed = false
+ }
Loader {
id: backgroundLoader