fix(Brightness): Simplified the code to use existing functionality, also fixed a bug with enforcing the minimum brightness

This commit is contained in:
Spyridon Siarapis
2026-04-08 17:40:41 +02:00
parent f3ed6d0a2f
commit 58d5c3ad55
2 changed files with 11 additions and 21 deletions
+2 -1
View File
@@ -478,7 +478,8 @@ Singleton {
}
function setBrightness(value: real): void {
value = Math.max(0, Math.min(1, value));
var min = Settings.data.brightness.enforceMinimum ? 0.01 : 0;
value = Math.max(min, Math.min(1, value));
var rounded = Math.round(value * 100);
// Always update internal value and trigger UI feedback immediately