diff options
author | Adrian Kummerlaender | 2015-08-04 15:20:03 +0200 |
---|---|---|
committer | Adrian Kummerlaender | 2015-08-04 15:20:03 +0200 |
commit | b1305646f8f77c19242b8241e29b09b9312aa8ca (patch) | |
tree | 11e909145c328bfe99d14869e006899bd6f0b003 | |
parent | 0c631b092b3447d71b4f6f7c98930360b41a98d9 (diff) | |
download | MetaTerm-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.
-rw-r--r-- | qml/EmbeddedTerminal.qml | 38 |
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 { |