mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
fix(Brightness): Simplified the code to use existing functionality, also fixed a bug with enforcing the minimum brightness
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user