Debian Codegraph @

resources/qml/components/NhekoTabButton.qml

raw
1 // SPDX-FileCopyrightText: Nheko Contributors
2 //
3 // SPDX-License-Identifier: GPL-3.0-or-later
4
5 import QtQuick 2.15
6 import QtQuick.Controls 2.15
7 import im.nheko 1.0
8
9 TabButton {
10 id: control
11
12 contentItem: Text {
13 text: control.text
14 font: control.font
15 opacity: enabled ? 1.0 : 0.3
16 color: control.down ? palette.highlightedText : palette.text
17 horizontalAlignment: Text.AlignHCenter
18 verticalAlignment: Text.AlignVCenter
19 elide: Text.ElideRight
20 }
21
22 background: Rectangle {
23 border.color: control.down ? palette.highlight : Nheko.theme.separator
24 color: control.checked ? palette.highlight : palette.base
25 border.width: 1
26 radius: 2
27 }
28 }
29