mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 14:59:27 -05:00
Make brightness quickslider follow gamma lower limit
This commit is contained in:
@@ -43,7 +43,7 @@ Rectangle {
|
||||
materialSymbol: "light_mode"
|
||||
secondaryMaterialSymbol: "wb_twilight"
|
||||
stopIndicatorValues: Hyprsunset.gamma !== 100 && root.brightnessMonitor?.brightness !== 0 ? [0.3 + root.brightnessMonitor?.brightness * 0.7] : []
|
||||
value: Hyprsunset.gamma === 100? 0.3 + root.brightnessMonitor?.brightness * 0.7 : Hyprsunset.gamma / 100 * 0.3
|
||||
value: Hyprsunset.gamma === 100? 0.3 + root.brightnessMonitor?.brightness * 0.7 : (Hyprsunset.gamma - Hyprsunset.gammaLowerLimit) / (100 - Hyprsunset.gammaLowerLimit) * 0.3
|
||||
tooltipContent: Hyprsunset.gamma === 100 ? `${Math.round(root.brightnessMonitor?.brightness * 100)}%` : `${Translation.tr("Gamma")} ${Hyprsunset.gamma}%`
|
||||
onMoved: {
|
||||
if (value >= 0.3) {
|
||||
@@ -57,7 +57,7 @@ Rectangle {
|
||||
if (root.brightnessMonitor.brightness !== 0) {
|
||||
root.brightnessMonitor.setBrightness(0);
|
||||
}
|
||||
Hyprsunset.setGamma(value * 100 / 0.3);
|
||||
Hyprsunset.setGamma((value / 0.3 * (100 - Hyprsunset.gammaLowerLimit) + Hyprsunset.gammaLowerLimit));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user