mirror of
https://github.com/belsabbagh/dotfiles.git
synced 2026-04-11 17:47:09 +00:00
29 lines
639 B
QML
29 lines
639 B
QML
import qs.config
|
|
import qs.modules.components
|
|
import qs.services
|
|
import QtQuick
|
|
import QtQuick.Layouts
|
|
import Quickshell
|
|
import Quickshell.Services.Pipewire
|
|
import Quickshell.Widgets
|
|
import QtQuick.Controls
|
|
|
|
|
|
StyledSlider {
|
|
id: brightnessSlider
|
|
Layout.fillWidth: true
|
|
from: 0
|
|
to: 1
|
|
stepSize: 0.01
|
|
property var monitor: Brightness.monitors.length > 0 ? Brightness.monitors[0] : null
|
|
value: monitor ? monitor.brightness : 0.5
|
|
|
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
|
|
|
property real level: brightnessSlider.value * 100
|
|
|
|
onMoved: if (monitor) {
|
|
monitor.setBrightness(value);
|
|
}
|
|
}
|