mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-11 07:52:50 -05:00
brightness: optimistically update OSDs, works better
This commit is contained in:
@@ -148,16 +148,28 @@ Row {
|
||||
enabled: DisplayService.brightnessAvailable && targetDeviceName.length > 0
|
||||
minimum: {
|
||||
if (!targetDevice) return 1
|
||||
const isLogarithmic = SessionData.getBrightnessLogarithmic(targetDevice.id)
|
||||
if (isLogarithmic) {
|
||||
return 1
|
||||
}
|
||||
return (targetDevice.class === "backlight" || targetDevice.class === "ddc") ? 1 : 0
|
||||
}
|
||||
maximum: {
|
||||
if (!targetDevice) return 100
|
||||
const isLogarithmic = SessionData.getBrightnessLogarithmic(targetDevice.id)
|
||||
if (isLogarithmic) {
|
||||
return 100
|
||||
}
|
||||
return targetDevice.displayMax || 100
|
||||
}
|
||||
value: targetBrightness
|
||||
showValue: true
|
||||
unit: {
|
||||
if (!targetDevice) return "%"
|
||||
const isLogarithmic = SessionData.getBrightnessLogarithmic(targetDevice.id)
|
||||
if (isLogarithmic) {
|
||||
return "%"
|
||||
}
|
||||
return targetDevice.class === "ddc" ? "" : "%"
|
||||
}
|
||||
onSliderValueChanged: function (newValue) {
|
||||
|
||||
Reference in New Issue
Block a user