Lay the Control Center out as a resizable, editable grid
Modules are tiles on a 4-column grid, each 1x1 to 4x4 and adapting its layout to its size. Edit Controls in the panel reorders by dragging, resizes from a corner handle, removes with a badge and adds from a tray. Connectivity splits into Wi-Fi, Bluetooth and Network tiles and Audio into Sound and Microphone; right-clicking Sound extends it with output devices and a volume slider per app. Adds a Caffeine tile. Config version 2 migrates existing layouts in place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0dcf37346c
commit
11bdc4c751
32 files changed
+2147
-355
No files matched your search
@@ -1,44 +1,24 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import ".."
|
||||
import "../../components"
|
||||
import "../../services"
|
||||
import "../../theme"
|
||||
|
||||
ControlCard {
|
||||
id: root
|
||||
// Display brightness; providers apply it on release.
|
||||
CCSlider {
|
||||
readonly property var info: SystemService.state.brightness || ({
|
||||
available: false
|
||||
})
|
||||
objectName: "brightnessTile"
|
||||
title: "Display"
|
||||
GlassBarSlider {
|
||||
objectName: "brightnessSlider"
|
||||
Layout.fillWidth: true
|
||||
glyph: ""
|
||||
fallback: "☀"
|
||||
from: 1
|
||||
to: 100
|
||||
stepSize: 1
|
||||
value: root.info.value || 1
|
||||
enabled: !!root.info.available && !SystemService.acting
|
||||
onPressedChanged: if (!pressed && enabled) {
|
||||
SystemService.action("brightness", value, false);
|
||||
value = Qt.binding(() => root.info.value || 1);
|
||||
}
|
||||
Keys.onReleased: event => {
|
||||
if (event.key === Qt.Key_Left || event.key === Qt.Key_Right) {
|
||||
SystemService.action("brightness", value, false);
|
||||
value = Qt.binding(() => root.info.value || 1);
|
||||
}
|
||||
}
|
||||
Accessible.name: "Display brightness"
|
||||
}
|
||||
Text {
|
||||
visible: !root.info.available
|
||||
text: root.info.notice || "No brightness provider"
|
||||
color: Theme.textSecondary
|
||||
font.pixelSize: 11
|
||||
wrapMode: Text.Wrap
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
glyph: ""
|
||||
fallback: "☀"
|
||||
sliderName: "brightnessSlider"
|
||||
from: 1
|
||||
to: 100
|
||||
stepSize: 1
|
||||
value: info.value || 1
|
||||
enabled: !!info.available && !SystemService.acting
|
||||
known: !!info.available
|
||||
notice: info.available ? "" : info.notice || "No brightness provider"
|
||||
onCommitted: value => SystemService.action("brightness", value, false)
|
||||
}
|
||||
Reference in new issue
Block a user