diff options
author | Adrian Kummerlaender | 2015-12-15 19:53:18 +0100 |
---|---|---|
committer | Adrian Kummerlaender | 2015-12-15 19:53:18 +0100 |
commit | 55c66514c6e03bc731c7f5ae4d6f6a1e1d1ab601 (patch) | |
tree | a8725d321568ce978fd1638758d43299ee99656b /src/widget/augment/Overlay.qml | |
parent | 012d8f7503d9d49ff33da621aee5fabd252e57f5 (diff) | |
download | MetaTerm-master.tar MetaTerm-master.tar.gz MetaTerm-master.tar.bz2 MetaTerm-master.tar.lz MetaTerm-master.tar.xz MetaTerm-master.tar.zst MetaTerm-master.zip |
Diffstat (limited to 'src/widget/augment/Overlay.qml')
-rw-r--r-- | src/widget/augment/Overlay.qml | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/src/widget/augment/Overlay.qml b/src/widget/augment/Overlay.qml new file mode 100644 index 0000000..ac1e230 --- /dev/null +++ b/src/widget/augment/Overlay.qml @@ -0,0 +1,60 @@ +import QtQuick 2.0 + +Item { + id: item + + property bool enabled : false + property alias text : content.text + + function displayBriefly() { + if ( enabled ) { + animation.restart() + } + } + + Rectangle { + id: background + + anchors.fill: parent + + opacity: 0 + color: settings.terminal.overlayBackground + + SequentialAnimation { + id: animation + + ScriptAction { + script: background.opacity = 0.8 + } + + PauseAnimation { + duration: 500 + } + + NumberAnimation { + target: background + property: "opacity" + + easing.type: Easing.InSine + duration: 300 + from: 0.8 + to: 0 + } + } + + Text { + id: content + + anchors { + horizontalCenter: background.horizontalCenter + verticalCenter: background.verticalCenter + } + + font { + family: settings.terminal.fontFamily + pointSize: settings.terminal.fontSize * 2 + } + color: settings.terminal.overlayFontColor + } + } +} |