diff options
Diffstat (limited to 'desktop/modules')
| -rw-r--r-- | desktop/modules/ai/AiPage.qml | 16 | ||||
| -rw-r--r-- | desktop/modules/bluetooth/BluetoothPage.qml | 42 | ||||
| -rw-r--r-- | desktop/modules/mail/MailPage.qml | 14 | ||||
| -rw-r--r-- | desktop/modules/services/ServicesPage.qml | 7 | ||||
| -rw-r--r-- | desktop/modules/sound/SoundPage.qml | 23 |
5 files changed, 26 insertions, 76 deletions
diff --git a/desktop/modules/ai/AiPage.qml b/desktop/modules/ai/AiPage.qml index c1cb07c..fed9e65 100644 --- a/desktop/modules/ai/AiPage.qml +++ b/desktop/modules/ai/AiPage.qml @@ -21,12 +21,7 @@ Column { spacing: 8 - Text { - width: page.width - text: "Engines" - font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 2; bold: true } - color: Theme.subtext - } + SectionHeader { divider: false; glyph: "\uf2db"; label: "Engines" } Repeater { model: page.ai.engines @@ -48,14 +43,7 @@ Column { } } - Item { width: 1; height: 6 } - - Text { - width: page.width - text: "Apps" - font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 2; bold: true } - color: Theme.subtext - } + SectionHeader { glyph: String.fromCodePoint(0xF003B); label: "Apps" } Repeater { model: page.ai.apps diff --git a/desktop/modules/bluetooth/BluetoothPage.qml b/desktop/modules/bluetooth/BluetoothPage.qml index 8ab67f0..a289205 100644 --- a/desktop/modules/bluetooth/BluetoothPage.qml +++ b/desktop/modules/bluetooth/BluetoothPage.qml @@ -22,21 +22,13 @@ Column { // --- Adapter --- - Item { - width: page.width - implicitHeight: Math.max(btLabel.implicitHeight, powerSwitch.implicitHeight) - - Text { - id: btLabel - anchors.verticalCenter: parent.verticalCenter - text: "Bluetooth" - font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 1; bold: true } - color: Theme.text - } + SectionHeader { + divider: false + glyph: "\uf293" + label: "Bluetooth" Switch { - id: powerSwitch - anchors { right: parent.right; verticalCenter: parent.verticalCenter } + anchors { right: parent.right; bottom: parent.bottom } enabled: page.bt.adapter !== null checked: page.bt.adapter ? page.bt.adapter.enabled : false onToggled: on => { if (page.bt.adapter) page.bt.adapter.enabled = on; } @@ -97,13 +89,7 @@ Column { // --- Connected --- - Text { - width: page.width - visible: page.bt.connectedDevices.length > 0 - text: "Connected" - font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 2; bold: true } - color: Theme.subtext - } + SectionHeader { visible: page.bt.connectedDevices.length > 0; glyph: "\uf0c1"; label: "Connected" } Repeater { model: page.bt.connectedDevices @@ -118,13 +104,7 @@ Column { // --- Paired --- - Text { - width: page.width - visible: page.bt.pairedDevices.length > 0 - text: "Paired" - font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 2; bold: true } - color: Theme.subtext - } + SectionHeader { visible: page.bt.pairedDevices.length > 0; glyph: String.fromCodePoint(0xF1218); label: "Paired" } Repeater { model: page.bt.pairedDevices @@ -139,13 +119,7 @@ Column { // --- Available (found while scanning, not yet paired) --- - Text { - width: page.width - visible: page.bt.availableDevices.length > 0 - text: "Available" - font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 2; bold: true } - color: Theme.subtext - } + SectionHeader { visible: page.bt.availableDevices.length > 0; glyph: "\uf002"; label: "Available" } Repeater { model: page.bt.availableDevices diff --git a/desktop/modules/mail/MailPage.qml b/desktop/modules/mail/MailPage.qml index 1b41412..03ce71a 100644 --- a/desktop/modules/mail/MailPage.qml +++ b/desktop/modules/mail/MailPage.qml @@ -67,13 +67,13 @@ Column { onLoadFailed: page.readHeartbeat("") } - Item { - width: parent.width - implicitHeight: totalText.implicitHeight + SectionHeader { + divider: false + glyph: "\uf0e0" + label: "Accounts" Text { - id: totalText - anchors.right: parent.right + anchors { right: parent.right; bottom: parent.bottom } // A dash rather than a possibly-wrong number while any account is // still unknown. text: Accounts.anyUnknown ? "—" : `${Accounts.total} unread` @@ -195,7 +195,7 @@ Column { } } - Rectangle { width: parent.width; height: 1; color: Qt.alpha(Theme.text, 0.12) } + SectionHeader { glyph: "\uf21e"; label: "Watcher" } // Watcher health. Green when idling, yellow when a folder gave up, red // when there is no fresh heartbeat at all. @@ -219,7 +219,7 @@ Column { } } - Rectangle { width: parent.width; height: 1; color: Qt.alpha(Theme.text, 0.12) } + Rectangle { width: parent.width; height: 1; color: Qt.alpha(Theme.text, 0.3) } Row { anchors.right: parent.right diff --git a/desktop/modules/services/ServicesPage.qml b/desktop/modules/services/ServicesPage.qml index cc392db..652f9da 100644 --- a/desktop/modules/services/ServicesPage.qml +++ b/desktop/modules/services/ServicesPage.qml @@ -13,7 +13,6 @@ import QtQuick import "../.." import "../ai" import "../deckit" -import "../qtmaildir" // Shells, deck-it and the daemons, one row each: Start when stopped, Stop and // Restart when running. The desktop shell has no Stop: it draws this page. @@ -27,7 +26,7 @@ Column { Component.onCompleted: { page.services.watchers++; DeckIt.watchers++; page.services.refresh(); } Component.onDestruction: { page.services.watchers--; DeckIt.watchers--; } - Heading { text: "Shells" } + SectionHeader { divider: false; glyph: "\uf120"; label: "Shells" } AiRow { width: page.width @@ -57,7 +56,7 @@ Column { } } - Heading { text: "deck-it" } + SectionHeader { glyph: String.fromCodePoint(0xF0ECE); label: "deck-it" } AiRow { width: page.width @@ -71,7 +70,7 @@ Column { onRestart: DeckIt.control("restart") } - Heading { text: "Daemons" } + SectionHeader { glyph: "\uf085"; label: "Daemons" } Repeater { model: page.services.daemons diff --git a/desktop/modules/sound/SoundPage.qml b/desktop/modules/sound/SoundPage.qml index 3f39c48..f220b61 100644 --- a/desktop/modules/sound/SoundPage.qml +++ b/desktop/modules/sound/SoundPage.qml @@ -128,22 +128,15 @@ Column { width: page.width spacing: 6 - Item { - width: parent.width - implicitHeight: name.implicitHeight - - Text { - id: name - anchors.left: parent.left - text: modelData.label - font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 1; bold: true } - color: Theme.text - } + SectionHeader { + divider: modelData.label !== "Output" + glyph: String.fromCodePoint(modelData.label === "Output" ? 0xF04C3 : 0xF036C) + label: modelData.label // State glyph and level, clickable to mute/unmute. Row { id: levelRow - anchors { right: parent.right; verticalCenter: parent.verticalCenter } + anchors { right: parent.right; bottom: parent.bottom } spacing: 6 Text { @@ -269,11 +262,7 @@ Column { spacing: 10 visible: page.service.streams.length > 0 - Text { - text: "Applications" - font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 1; bold: true } - color: Theme.text - } + SectionHeader { glyph: String.fromCodePoint(0xF003B); label: "Applications" } Repeater { model: page.service.streams |
