cool-retro-term

Форк
0
/
SizeOverlay.qml 
53 строки · 1.6 Кб
1
/*******************************************************************************
2
* Copyright (c) 2013-2021 "Filippo Scognamiglio"
3
* https://github.com/Swordfish90/cool-retro-term
4
*
5
* This file is part of cool-retro-term.
6
*
7
* cool-retro-term is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation, either version 3 of the License, or
10
* (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
*******************************************************************************/
20
import QtQuick 2.2
21

22
Rectangle {
23
    property size terminalSize
24
    property real topOpacity: 0.6
25

26
    width: textSize.width * 2
27
    height: textSize.height * 2
28
    radius: 5
29
    border.width: 2
30
    border.color: "white"
31
    color: "black"
32
    opacity: sizetimer.running ? 0.6 : 0.0
33

34
    Behavior on opacity {
35
        NumberAnimation {
36
            duration: 200
37
        }
38
    }
39

40
    onTerminalSizeChanged: sizetimer.restart()
41

42
    Text {
43
        id: textSize
44
        anchors.centerIn: parent
45
        color: "white"
46
        text: terminalSize.width + "x" + terminalSize.height
47
    }
48
    Timer {
49
        id: sizetimer
50
        interval: 1000
51
        running: false
52
    }
53
}
54

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.