Debian Codegraph @

src/qml/TabButtonMainFooter.qml

raw
1 // SPDX-License-Identifier: GPL-3.0-or-later
2 // Copyright 2025 Juan Palacios <[email protected]>
3
4 import QtQuick 2.15
5 import QtQuick.Controls 2.15
6 import QtQuick.Layouts 1.15
7 import "Style.js" as Style
8
9 TabButton {
10 id: btn
11 implicitHeight: 48
12
13 contentItem: Text {
14 text: btn.text
15 font: btn.font
16 color: btn.checked ? Style.Theme.accent
17 : Style.Theme.foreground
18 horizontalAlignment: Text.AlignHCenter
19 verticalAlignment: Text.AlignVCenter
20 elide: Text.ElideRight
21 }
22
23 background: ColumnLayout {
24 anchors.fill: parent
25 spacing: 0
26
27 // active accent
28 Rectangle {
29 visible: btn.checked
30 color: Style.Theme.accent
31 Layout.preferredHeight: 2
32 Layout.fillWidth: true
33 }
34 // content
35 Rectangle {
36 color: btn.hovered ? Style.TabBar.Button.MainFooter.background_alt
37 : Style.TabBar.Button.MainFooter.background
38 Layout.fillWidth: true
39 Layout.fillHeight: true
40 }
41 }
42 }