diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-08-28 16:23:20 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-09-12 09:04:58 +0000 |
commit | a1b42f95a711f8d8fb87d79ad04eee0a433749ed (patch) | |
tree | 5f93488fa9b471fbba9244b8934204438b0e460e /tests/manual | |
parent | 47b3b1b10246cad6709c0cd99f02208dbaf6b7c0 (diff) |
rename TapHandler.isPressed property to pressed
This is for the sake of convention. Unfortunately (and the reason
it wasn't done this way at the outset), it may prevent us from ever
having a signal called "pressed" in this handler or its base class.
Change-Id: Iafa117410e0e33562290b87df59bc8c0085c217d
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'tests/manual')
-rw-r--r-- | tests/manual/pointer/content/MultiButton.qml | 4 | ||||
-rw-r--r-- | tests/manual/pointer/content/Slider.qml | 4 | ||||
-rw-r--r-- | tests/manual/pointer/content/TapHandlerButton.qml | 2 | ||||
-rw-r--r-- | tests/manual/pointer/tapHandler.qml | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/tests/manual/pointer/content/MultiButton.qml b/tests/manual/pointer/content/MultiButton.qml index 4a737dc9b0..fec8462ea0 100644 --- a/tests/manual/pointer/content/MultiButton.qml +++ b/tests/manual/pointer/content/MultiButton.qml @@ -44,7 +44,7 @@ import Qt.labs.handlers 1.0 Rectangle { id: root property alias label: label.text - property alias pressed: tap.isPressed + property alias pressed: tap.pressed property bool checked: false property alias gesturePolicy: tap.gesturePolicy signal tapped @@ -53,7 +53,7 @@ Rectangle { border.color: "#9f9d9a"; border.width: 1; radius: height / 4; antialiasing: true gradient: Gradient { - GradientStop { position: 0.0; color: tap.isPressed ? "#b8b5b2" : "#efebe7" } + GradientStop { position: 0.0; color: tap.pressed ? "#b8b5b2" : "#efebe7" } GradientStop { position: 1.0; color: "#b8b5b2" } } diff --git a/tests/manual/pointer/content/Slider.qml b/tests/manual/pointer/content/Slider.qml index 809e4c5f1c..d38805023a 100644 --- a/tests/manual/pointer/content/Slider.qml +++ b/tests/manual/pointer/content/Slider.qml @@ -47,7 +47,7 @@ Item { property int maximumValue: 99 property alias label: label.text property alias tapEnabled: tap.enabled - property alias pressed: tap.isPressed + property alias pressed: tap.pressed signal tapped DragHandler { @@ -82,7 +82,7 @@ Item { anchors.horizontalCenterOffset: 1 radius: 5 color: "#4400FFFF" - opacity: tap.isPressed || tapFlash.running ? 1 : 0 + opacity: tap.pressed || tapFlash.running ? 1 : 0 FlashAnimation on visible { id: tapFlash } diff --git a/tests/manual/pointer/content/TapHandlerButton.qml b/tests/manual/pointer/content/TapHandlerButton.qml index e40c539686..6724ea896d 100644 --- a/tests/manual/pointer/content/TapHandlerButton.qml +++ b/tests/manual/pointer/content/TapHandlerButton.qml @@ -48,7 +48,7 @@ Item { property alias text: buttonLabel.text property alias label: buttonLabel signal clicked - property alias pressed: th.isPressed + property alias pressed: th.pressed implicitHeight: Math.max(Screen.pixelDensity * 7, buttonLabel.implicitHeight * 1.2) implicitWidth: Math.max(Screen.pixelDensity * 11, buttonLabel.implicitWidth * 1.3) height: implicitHeight diff --git a/tests/manual/pointer/tapHandler.qml b/tests/manual/pointer/tapHandler.qml index 5dac99a899..fcd7dfd443 100644 --- a/tests/manual/pointer/tapHandler.qml +++ b/tests/manual/pointer/tapHandler.qml @@ -50,7 +50,7 @@ Item { id: rect anchors.fill: parent; anchors.margins: 40 border.width: 3; border.color: "transparent" - color: handler.isPressed ? "lightsteelblue" : "darkgrey" + color: handler.pressed ? "lightsteelblue" : "darkgrey" TapHandler { id: handler @@ -111,7 +111,7 @@ Item { Rectangle { id: expandingCircle radius: handler.timeHeld * 100 - visible: radius > 0 && handler.isPressed + visible: radius > 0 && handler.pressed border.width: 3 border.color: borderBlink.blinkColor color: "transparent" |