Files
z-bar-qt/Modules/Bar/Components/HyprsunsetWidget.qml
T

36 lines
740 B
QML

import QtQuick
import ZShell.Config
import qs.Components
import qs.Modules.Bar.Components.Common
import qs.Helpers
import qs.Services
WidgetBase {
id: root
property bool tempEnabled: Hyprsunset.enabled
color: root.tempEnabled ? Colors.palette.m3primary : Colors.tPalette.m3surfaceContainer
radius: Tokens.rounding.full
StateLayer {
onClicked: {
Hyprsunset.toggleNightLight();
Hyprsunset.manualToggle = true;
}
}
MaterialIcon {
anchors.centerIn: parent
animate: true
color: root.tempEnabled ? Colors.palette.m3onPrimary : Colors.palette.m3onSurface
fill: root.tempEnabled ? 1 : 0
fontStyle: Tokens.font.icon.small
text: root.tempEnabled ? "lightbulb" : "light_off"
Behavior on fill {
Anim {}
}
}
}