summaryrefslogtreecommitdiffstats
path: root/tests/effects.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/effects.qml')
-rw-r--r--tests/effects.qml30
1 files changed, 25 insertions, 5 deletions
diff --git a/tests/effects.qml b/tests/effects.qml
index 3f7786c..a7d9ab2 100644
--- a/tests/effects.qml
+++ b/tests/effects.qml
@@ -159,7 +159,6 @@ Rectangle {
color: "red"
font.pixelSize: 12
text: effectSource2.static ? "Static" : "Dynamic"
- horizontalAlignment: Text.AlignHCenter
}
}
@@ -243,7 +242,6 @@ Rectangle {
color: "red"
font.pixelSize: 12
text: effectSource3.static ? "Static" : "Dynamic"
- horizontalAlignment: Text.AlignHCenter
}
}
@@ -379,7 +377,6 @@ Rectangle {
color: "red"
font.pixelSize: 12
text: effectSource5.static ? "Static" : "Dynamic"
- horizontalAlignment: Text.AlignHCenter
}
}
@@ -570,6 +567,25 @@ Rectangle {
visible: !parent.active
}
}
+
+ Text {
+ anchors.left: effect1.left
+ anchors.top: effect1.top
+ anchors.margins: 3
+ color: "red"
+ font.pixelSize: 12
+ text: effectSource2.mipmap ? "Mipmap on" : "Mipmap off"
+ opacity: 0
+
+ SequentialAnimation on opacity {
+ id: mipmapStateAnim
+ running: false
+ PropertyAction { value: 1 }
+ PauseAnimation { duration: 1000 }
+ NumberAnimation { to: 0; duration: 1000 }
+ }
+ }
+
ShaderEffectItem {
id: effect2
@@ -800,6 +816,7 @@ Rectangle {
onClicked: { parent.value = Math.min(1.25 * parent.value, parent.max) }
}
MouseArea {
+ id: mipmapButton
anchors.left: parent.left
anchors.top: parent.top
height: parent.height / 2
@@ -823,10 +840,13 @@ Rectangle {
width: parent.width
height: 4
rotation: -45
- visible: !controls.mipmap
+ visible: controls.mipmap
}
}
- onClicked: { parent.mipmap = !parent.mipmap }
+ onClicked: {
+ parent.mipmap = !parent.mipmap
+ mipmapStateAnim.restart()
+ }
}
}
}