mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-08-12 02:28:37 +02:00
ported some quickshell stuff from rivendell-hyprdots
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import QtQuick.Layouts
|
||||
import "../"
|
||||
|
||||
MouseArea {
|
||||
id: root
|
||||
|
||||
implicitWidth: 26
|
||||
implicitHeight: 26
|
||||
|
||||
hoverEnabled: true
|
||||
acceptedButtons: Qt.LeftButton
|
||||
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
source: `../assets/${Globals.isDarkTheme ? "sun" : "moon"}.png`
|
||||
smooth: false
|
||||
|
||||
scale: root.containsMouse ? 0.9 : 1
|
||||
Behavior on scale {
|
||||
NumberAnimation {
|
||||
duration: 70
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onPressed: () => {
|
||||
Globals.isDarkTheme = !Globals.isDarkTheme;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user