From 2b9c732f0515bf0f6bb7444e10faddfd1ff4e485 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 30 Nov 2026 17:49:01 +0100 Subject: feat(drawer): one section header across the drawer pages The drawer pages divided their sections with subtext-coloured titles at fontSize - 2 and 1px lines at 0.12 alpha, and the sections ran together. desktop/SectionHeader.qml is the one title now: an accent glyph, a bold label one size up, and a divider at 0.3 with space above it, off for a page's first section. Children sit on the right, anchored to the bottom where the label is, so the Bluetooth and Wi-Fi switches and the sound level/mute control ride in the header. Sound, Bluetooth, Mail, Services and AI use it. Mail had no titles: the unread total moves into an Accounts header, and its first divider becomes a Watcher header. Services drops its import of ../qtmaildir, which was only there for Heading; Heading stays as the settings window's title and is untouched. Every glyph was checked in Inconsolata Nerd Font's cmap. Co-Authored-By: Claude Opus 5.5 --- desktop/modules/bluetooth/BluetoothPage.qml | 42 ++++++----------------------- 1 file changed, 8 insertions(+), 34 deletions(-) (limited to 'desktop/modules/bluetooth/BluetoothPage.qml') 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 -- cgit v1.2.3