From 420bb714a8c8ebc67ad958897939d7d96e11806c Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Wed, 5 Jun 2013 09:54:28 +0200 Subject: Expose hovered to our controls and document it consistently The current solution is messy and we only expose it partially to some of our styles. I think we should simply expose this to all. Change-Id: Ia546d5657ea416df99c9d9d92cc714b7f1c928fe Reviewed-by: Caroline Chao Reviewed-by: Nico Vertriest --- src/controls/SpinBox.qml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/controls/SpinBox.qml') diff --git a/src/controls/SpinBox.qml b/src/controls/SpinBox.qml index 68f97e0a..b1f87cec 100644 --- a/src/controls/SpinBox.qml +++ b/src/controls/SpinBox.qml @@ -134,12 +134,19 @@ Control { */ property alias font: input.font - /*! This property indicates if the Spinbox should get active + /*! This property indicates whether the Spinbox should get active focus when pressed. The default value is \c true. */ property bool activeFocusOnPress: true + /*! + \qmlproperty bool SpinBox::hovered + + This property indicates whether the control is being hovered. + */ + readonly property alias hovered: mouseArea.containsMouse + style: Qt.createComponent(Settings.style + "/SpinBoxStyle.qml", spinbox) /*! \internal */ @@ -166,8 +173,6 @@ Control { readonly property alias downPressed: mouseDown.pressed readonly property alias downHovered: mouseDown.containsMouse - readonly property alias hovered: mouseArea.containsMouse - readonly property int contentHeight: Math.max(input.implicitHeight, 16) readonly property int contentWidth: Math.max(maxSizeHint.implicitWidth, minSizeHint.implicitWidth) } -- cgit v1.2.1