mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-06 05:25:41 -05:00
ddc use raw values not percent
This commit is contained in:
@@ -150,8 +150,16 @@ Row {
|
||||
if (!targetDevice) return 1
|
||||
return (targetDevice.class === "backlight" || targetDevice.class === "ddc") ? 1 : 0
|
||||
}
|
||||
maximum: 100
|
||||
maximum: {
|
||||
if (!targetDevice) return 100
|
||||
return targetDevice.displayMax || 100
|
||||
}
|
||||
value: targetBrightness
|
||||
showValue: true
|
||||
unit: {
|
||||
if (!targetDevice) return "%"
|
||||
return targetDevice.class === "ddc" ? "" : "%"
|
||||
}
|
||||
onSliderValueChanged: function (newValue) {
|
||||
if (DisplayService.brightnessAvailable && targetDeviceName) {
|
||||
DisplayService.setBrightness(newValue, targetDeviceName, true)
|
||||
|
||||
@@ -65,10 +65,18 @@ DankOSD {
|
||||
if (!deviceInfo) return 1
|
||||
return (deviceInfo.class === "backlight" || deviceInfo.class === "ddc") ? 1 : 0
|
||||
}
|
||||
maximum: 100
|
||||
maximum: {
|
||||
const deviceInfo = DisplayService.getCurrentDeviceInfo()
|
||||
if (!deviceInfo) return 100
|
||||
return deviceInfo.displayMax || 100
|
||||
}
|
||||
enabled: DisplayService.brightnessAvailable
|
||||
showValue: true
|
||||
unit: "%"
|
||||
unit: {
|
||||
const deviceInfo = DisplayService.getCurrentDeviceInfo()
|
||||
if (!deviceInfo) return "%"
|
||||
return deviceInfo.class === "ddc" ? "" : "%"
|
||||
}
|
||||
thumbOutlineColor: Theme.surfaceContainer
|
||||
alwaysShowValue: SettingsData.osdAlwaysShowValue
|
||||
|
||||
|
||||
Reference in New Issue
Block a user