Add Dim Desktop option

This commit is contained in:
ly-sec 2025-07-18 22:47:38 +02:00
parent 828f98b58e
commit 7cdfa5f82b
4 changed files with 58 additions and 2 deletions

3
.gitignore vendored
View file

@ -1 +1,2 @@
.qmlls.ini .qmlls.ini
notification_history.json

View file

@ -5,7 +5,7 @@ import qs.Settings
PanelWindow { PanelWindow {
id: outerPanel id: outerPanel
property bool showOverlay: true property bool showOverlay: Settings.settings.dimPanels
property int topMargin: 36 property int topMargin: 36
property color overlayColor: showOverlay ? Theme.overlay : "transparent" property color overlayColor: showOverlay ? Theme.overlay : "transparent"

View file

@ -56,6 +56,7 @@ Singleton {
property string visualizerType: "radial" property string visualizerType: "radial"
property bool reverseDayMonth: false property bool reverseDayMonth: false
property bool use12HourClock: false property bool use12HourClock: false
property bool dimPanels: true
} }
} }

View file

@ -307,6 +307,60 @@ Rectangle {
} }
} }
// Dim Windows Setting
RowLayout {
spacing: 8
Layout.fillWidth: true
Layout.topMargin: 8
Text {
text: "Dim Desktop"
font.family: Theme.fontFamily
font.pixelSize: 13
font.bold: true
color: Theme.textPrimary
}
Item {
Layout.fillWidth: true
}
// Custom Material 3 Switch
Rectangle {
id: dimWindowsSwitch
width: 52
height: 32
radius: 16
color: Settings.settings.dimPanels ? Theme.accentPrimary : Theme.surfaceVariant
border.color: Settings.settings.dimPanels ? Theme.accentPrimary : Theme.outline
border.width: 2
Rectangle {
id: dimWindowsThumb
width: 28
height: 28
radius: 14
color: Theme.surface
border.color: Theme.outline
border.width: 1
y: 2
x: Settings.settings.dimPanels ? dimWindowsSwitch.width - width - 2 : 2
Behavior on x {
NumberAnimation { duration: 200; easing.type: Easing.OutCubic }
}
}
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: {
Settings.settings.dimPanels = !Settings.settings.dimPanels
}
}
}
}
// Visualizer Type Selection // Visualizer Type Selection
ColumnLayout { ColumnLayout {
spacing: 8 spacing: 8