mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-01-19 12:33:51 +00:00
30 lines
627 B
QML
30 lines
627 B
QML
import QtQuick 2.2
|
|
|
|
Rectangle{
|
|
property size terminalSize
|
|
property real topOpacity: 0.6
|
|
width: textSize.width * 2
|
|
height: textSize.height * 2
|
|
radius: 5
|
|
border.width: 2
|
|
border.color: "white"
|
|
color: "black"
|
|
opacity: sizetimer.running ? 0.6 : 0.0
|
|
|
|
Behavior on opacity{NumberAnimation{duration: 200}}
|
|
|
|
onTerminalSizeChanged: sizetimer.restart()
|
|
|
|
Text{
|
|
id: textSize
|
|
anchors.centerIn: parent
|
|
color: "white"
|
|
text: terminalSize.width + "x" + terminalSize.height
|
|
}
|
|
Timer{
|
|
id: sizetimer
|
|
interval: 1000
|
|
running: false
|
|
}
|
|
}
|