Files
z-bar-qt/Modules/HyprsunsetWidget.qml
T
zach 0092b41a05
C++ / fmt (pull_request) Successful in 4s
JS/TS / fmt (pull_request) Successful in 22s
JS/TS / lint (pull_request) Successful in 27s
Python / fmt (pull_request) Successful in 33s
Python / lint (pull_request) Successful in 32s
Python / test (pull_request) Successful in 1m3s
Python / typecheck (pull_request) Failing after 1m4s
Rust / fmt (pull_request) Successful in 41s
Rust / build (pull_request) Successful in 1m39s
C++ / build (pull_request) Successful in 2m33s
Rust / clippy (pull_request) Successful in 1m18s
Python / buildcheck (pull_request) Successful in 2m23s
C++ / clang-tidy (pull_request) Successful in 3m56s
fix config file writing + positioning issues
2026-08-14 22:15:11 +02:00

39 lines
921 B
QML

import QtQuick
import ZShell.Config
import qs.Components
import qs.Helpers
import qs.Services
CustomRect {
id: root
required property bool horizontal
property bool tempEnabled: Hyprsunset.enabled
color: root.tempEnabled ? Colors.palette.m3primary : Colors.tPalette.m3surfaceContainer
implicitHeight: horizontal ? Math.max(Config.bar.height, Tokens.bar.innerSize) : width
implicitWidth: horizontal ? height : Math.max(Config.bar.height, Tokens.bar.innerSize)
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
font.pointSize: Tokens.font.size.larger
text: root.tempEnabled ? "lightbulb" : "light_off"
Behavior on fill {
Anim {
}
}
}
}