aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2015-08-04 08:14:14 +0200
committerAdrian Kummerlaender2015-08-04 08:14:14 +0200
commit0c631b092b3447d71b4f6f7c98930360b41a98d9 (patch)
tree70702976b80eec9bbf6cbfd87c7e447fdb020d0b
parent39016bbc237171554a5a5b09575eb978f098b73d (diff)
downloadMetaTerm-0c631b092b3447d71b4f6f7c98930360b41a98d9.tar
MetaTerm-0c631b092b3447d71b4f6f7c98930360b41a98d9.tar.gz
MetaTerm-0c631b092b3447d71b4f6f7c98930360b41a98d9.tar.bz2
MetaTerm-0c631b092b3447d71b4f6f7c98930360b41a98d9.tar.lz
MetaTerm-0c631b092b3447d71b4f6f7c98930360b41a98d9.tar.xz
MetaTerm-0c631b092b3447d71b4f6f7c98930360b41a98d9.tar.zst
MetaTerm-0c631b092b3447d71b4f6f7c98930360b41a98d9.zip
Implemented basic terminal size overlay
Needs further fiddling concerning the animation curve and display duration
-rw-r--r--qml/EmbeddedTerminal.qml56
1 files changed, 56 insertions, 0 deletions
diff --git a/qml/EmbeddedTerminal.qml b/qml/EmbeddedTerminal.qml
index 7e021b3..70b7cf1 100644
--- a/qml/EmbeddedTerminal.qml
+++ b/qml/EmbeddedTerminal.qml
@@ -75,6 +75,62 @@ Item {
onTermGetFocus: highlighter.focus()
onTermLostFocus: highlighter.unfocus()
+ onHeightChanged: overlay.displayBriefly();
+
+ Rectangle {
+ id: overlay
+
+ function displayBriefly() {
+ animation.running = true;
+ }
+
+ anchors.fill: parent
+ opacity: 0
+ color: "black"
+
+ Text {
+ anchors {
+ horizontalCenter: overlay.horizontalCenter
+ verticalCenter: overlay.verticalCenter
+ }
+
+ text: {
+ return item.lines
+ + 'x'
+ + Math.floor(terminal.width / terminal.fontMetrics.width);
+ }
+
+ font {
+ family: settings.fontFamily
+ pointSize: 16
+ }
+ 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 {
anchors.fill: parent