From 55895c872412e062984908baacfac8e6363d36f4 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Tue, 4 Aug 2015 22:01:53 +0200 Subject: Increased overlay animation duration This further discourages flickering during continuous terminal resize operations. Overlay is now only enabled for resize operations after the terminal instantiation. --- qml/EmbeddedTerminal.qml | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) (limited to 'qml/EmbeddedTerminal.qml') diff --git a/qml/EmbeddedTerminal.qml b/qml/EmbeddedTerminal.qml index 6d8b266..81814bb 100644 --- a/qml/EmbeddedTerminal.qml +++ b/qml/EmbeddedTerminal.qml @@ -79,6 +79,7 @@ Item { forceActiveFocus(); highlighter.select(); session.startShellProgram(); + overlay.enabled = true; } onTermGetFocus: highlighter.focus() @@ -89,24 +90,36 @@ Item { Rectangle { id: overlay + property bool enabled : false + function displayBriefly() { - animation.restart(); + if ( enabled ) { animation.restart() } } anchors.fill: parent opacity: 0 color: settings.overlayBackground - NumberAnimation { + SequentialAnimation { id: animation - target: overlay - property: "opacity" + ScriptAction { + script: overlay.opacity = 0.8 + } + + PauseAnimation { + duration: 500 + } + + NumberAnimation { + target: overlay + property: "opacity" - easing.type: Easing.InSine - duration: 500 - from: 0.8 - to: 0 + easing.type: Easing.InSine + duration: 500 + from: 0.8 + to: 0 + } } Text { -- cgit v1.2.3