resolved a probleme between upower and quickshell

This commit is contained in:
Tomas Rivera
2026-03-11 11:06:28 +01:00
parent d374a70c9c
commit f770f80230
3 changed files with 1 additions and 59 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ Item {
readonly property bool isPluggedIn: isCharging || chargeState == UPowerDeviceState.PendingCharge
readonly property real percentage: UPower.displayDevice.percentage
readonly property bool isLow: percentage <= 0.20
readonly property bool isLaptop: UPowerDevice.isLaptopBattery
readonly property bool isLaptop: true // hardcoded because this doesnt work UPowerDevice.isLaptopBattery
width: 32
height: 32
-31
View File
@@ -1,31 +0,0 @@
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;
}
}