Files
z-bar-qt/Modules/HyprsunsetWidget.qml
T
zach 4df31d7564
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 10s
Python / lint-format (pull_request) Successful in 16s
Python / test (pull_request) Successful in 29s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m6s
added services page + rename barConfig json property to bar, migration helper function
2026-06-24 15:30:33 +02:00

36 lines
777 B
QML

import QtQuick
import qs.Components
import qs.Helpers
import qs.Config
CustomRect {
id: root
property bool tempEnabled: Hyprsunset.enabled
color: root.tempEnabled ? DynamicColors.palette.m3primary : DynamicColors.tPalette.m3surfaceContainer
implicitHeight: Config.bar.height + Appearance.padding.smallest * 2
implicitWidth: implicitHeight
radius: Appearance.rounding.full
StateLayer {
onClicked: {
Hyprsunset.toggleNightLight();
Hyprsunset.manualToggle = true;
}
}
MaterialIcon {
anchors.centerIn: parent
animate: true
color: root.tempEnabled ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3onSurface
fill: root.tempEnabled ? 1 : 0
text: root.tempEnabled ? "lightbulb" : "light_off"
Behavior on fill {
Anim {
}
}
}
}