DarkModeToggle: new bar widget
This commit is contained in:
parent
b908dc0ed2
commit
508c1407be
7 changed files with 89 additions and 36 deletions
23
Modules/Bar/Widgets/DarkModeToggle.qml
Normal file
23
Modules/Bar/Widgets/DarkModeToggle.qml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import Quickshell
|
||||
import qs.Commons
|
||||
import qs.Widgets
|
||||
import qs.Services
|
||||
|
||||
NIconButton {
|
||||
id: root
|
||||
|
||||
property ShellScreen screen
|
||||
property real scaling: 1.0
|
||||
|
||||
icon: "contrast"
|
||||
tooltipText: "Toggle light/dark mode"
|
||||
sizeRatio: 0.8
|
||||
|
||||
colorBg: Color.mSurfaceVariant
|
||||
colorFg: Color.mOnSurface
|
||||
colorBorder: Color.transparent
|
||||
colorBorderHover: Color.transparent
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
onClicked: Settings.data.colorSchemes.darkMode = !Settings.data.colorSchemes.darkMode
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue