aboutsummaryrefslogtreecommitdiff
path: root/qml/EmbeddedTerminal.qml
diff options
context:
space:
mode:
authorAdrian Kummerlaender2015-08-04 15:20:03 +0200
committerAdrian Kummerlaender2015-08-04 15:20:03 +0200
commitb1305646f8f77c19242b8241e29b09b9312aa8ca (patch)
tree11e909145c328bfe99d14869e006899bd6f0b003 /qml/EmbeddedTerminal.qml
parent0c631b092b3447d71b4f6f7c98930360b41a98d9 (diff)
downloadMetaTerm-b1305646f8f77c19242b8241e29b09b9312aa8ca.tar
MetaTerm-b1305646f8f77c19242b8241e29b09b9312aa8ca.tar.gz
MetaTerm-b1305646f8f77c19242b8241e29b09b9312aa8ca.tar.bz2
MetaTerm-b1305646f8f77c19242b8241e29b09b9312aa8ca.tar.lz
MetaTerm-b1305646f8f77c19242b8241e29b09b9312aa8ca.tar.xz
MetaTerm-b1305646f8f77c19242b8241e29b09b9312aa8ca.tar.zst
MetaTerm-b1305646f8f77c19242b8241e29b09b9312aa8ca.zip
Fixed overlay display animation timeout
The animation is now restarted on every height and width change event. In practice this leads to the overlay being displayed continuously during multiline resize operations but only briefly on single line resize operations.
Diffstat (limited to 'qml/EmbeddedTerminal.qml')
-rw-r--r--qml/EmbeddedTerminal.qml38
1 files changed, 13 insertions, 25 deletions
diff --git a/qml/EmbeddedTerminal.qml b/qml/EmbeddedTerminal.qml
index 70b7cf1..382a781 100644
--- a/qml/EmbeddedTerminal.qml
+++ b/qml/EmbeddedTerminal.qml
@@ -76,18 +76,30 @@ Item {
onTermGetFocus: highlighter.focus()
onTermLostFocus: highlighter.unfocus()
onHeightChanged: overlay.displayBriefly();
+ onWidthChanged: overlay.displayBriefly();
Rectangle {
id: overlay
function displayBriefly() {
- animation.running = true;
+ animation.restart();
}
anchors.fill: parent
opacity: 0
color: "black"
+ NumberAnimation {
+ id: animation
+ target: overlay
+ property: "opacity"
+
+ easing.type: Easing.InSine
+ duration: 500
+ from: 0.8
+ to: 0
+ }
+
Text {
anchors {
horizontalCenter: overlay.horizontalCenter
@@ -106,30 +118,6 @@ Item {
}
color: "white"
}
-
- SequentialAnimation {
- id: animation
-
- NumberAnimation {
- target: overlay
- property: "opacity"
-
- easing.type: Easing.InSine
- duration: 500
- from: 0
- to: 0.8
- }
-
- NumberAnimation {
- target: overlay
- property: "opacity"
-
- easing.type: Easing.InSine
- duration: 500
- from: 0.8
- to: 0
- }
- }
}
MouseArea {