Files
glassMxrph/quickshell/controlcenter/modules/Brightness.qml
T
mxandClaude Opus 5.5 99e64a7713 Add glassMxrph shell sources
Initial commit of the Quickshell desktop suite: bar, dock, launcher,
settings, Control Center, dashboard, OSD, lock screen, desktop widgets,
plugin host with the vendored Noctalia/Omarchy compatibility layer,
helpers, packaging, tests and phase documentation.

Includes the optimization work so far: usage widgets and dashboard
gauges no longer animate continuously, desktop widgets pause while
covered, system controls stop flickering on background polls, dock app
matching uses an indexed catalog, and workspace ghosts are created only
for occupied slots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 22:36:17 +02:00

45 lines
1.3 KiB
QML

import QtQuick
import QtQuick.Layouts
import ".."
import "../../components"
import "../../services"
import "../../theme"
ControlCard {
id: root
readonly property var info: SystemService.state.brightness || ({
available: false
})
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
}
}