Debian Codegraph @

src/qml/main.qml

raw
1 // SPDX-License-Identifier: GPL-3.0-or-later
2 // Copyright 2019 Juan Palacios <[email protected]>
3
4 import QtQuick 2.15
5 import QtQuick.Controls 2.15
6 import QtQuick.Controls.Universal 2.12
7 import QtQuick.Layouts 1.15
8 import "Style.js" as Style
9 import "Settings.js" as Settings
10
11 ApplicationWindow {
12 id: appWindow
13
14 title: appInfo.name
15
16 font.family: Style.g_text.family
17 font.pointSize: Style.g_text.size
18 font.weight: Font.Normal
19 font.capitalization: Font.MixedCase
20
21 Universal.theme: Universal.Dark
22 Universal.accent: Style.Theme.accent
23 Universal.foreground: Style.Theme.foreground
24 Universal.background: Style.Theme.background
25
26 StackLayout {
27 id: components
28
29 anchors.fill: parent
30 currentIndex: tabBar.currentIndex
31
32 Profiles {}
33 System {}
34 }
35
36 onVisibleChanged: components.visible = visible
37
38 footer: TabBar {
39 id: tabBar
40 font.bold: true
41 font.capitalization: Font.AllUppercase
42 hoverEnabled: Style.g_hover
43
44 TabButtonMainFooter {
45 text: qsTr("Profiles")
46 }
47 TabButtonMainFooter {
48 text: qsTr("System")
49 }
50
51 background: Rectangle {} // HACK: avoid empty space bellow buttons
52 }
53
54 onClosing: close => {
55 if (!systemTray.isAvailable() || !systemTray.isVisible())
56 Qt.quit()
57 }
58 }