Files
z-bar-qt/Modules/Bar/Components/NightlightWidget.qml
T
zach 4c3d38f023
C++ / fmt (pull_request) Failing after 5s
C++ / build (pull_request) Failing after 10s
JS/TS / fmt (pull_request) Successful in 6s
C++ / clang-tidy (pull_request) Failing after 21s
JS/TS / lint (pull_request) Successful in 10s
Python / static (pull_request) Successful in 26s
Rust / build (pull_request) Successful in 47s
Rust / fmt (pull_request) Successful in 28s
Python / verify (pull_request) Successful in 1m39s
Rust / clippy (pull_request) Successful in 46s
fix: define declared method + insert new bar entries to config file list + rename Hyprsunset -> Nightlight
2026-09-28 13:11:31 +02:00

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: Nightlight.enabled
color: root.tempEnabled ? Colors.palette.m3primary : Colors.tPalette.m3surfaceContainer
radius: Tokens.rounding.full
StateLayer {
onClicked: {
Nightlight.toggleNightLight();
Nightlight.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 {}
}
}
}