Add Dim Desktop option
This commit is contained in:
parent
828f98b58e
commit
7cdfa5f82b
4 changed files with 58 additions and 2 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1 +1,2 @@
|
|||
.qmlls.ini
|
||||
.qmlls.ini
|
||||
notification_history.json
|
||||
|
|
@ -5,7 +5,7 @@ import qs.Settings
|
|||
|
||||
PanelWindow {
|
||||
id: outerPanel
|
||||
property bool showOverlay: true
|
||||
property bool showOverlay: Settings.settings.dimPanels
|
||||
property int topMargin: 36
|
||||
property color overlayColor: showOverlay ? Theme.overlay : "transparent"
|
||||
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ Singleton {
|
|||
property string visualizerType: "radial"
|
||||
property bool reverseDayMonth: false
|
||||
property bool use12HourClock: false
|
||||
property bool dimPanels: true
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
ColumnLayout {
|
||||
spacing: 8
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue