mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-07 22:15:38 -05:00
brightness: dont cap to 1 minimum for non-backlight/ddc
This commit is contained in:
@@ -310,6 +310,13 @@ Rectangle {
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
if (screenName && screenName.length > 0 && modelData.name !== currentDeviceName) {
|
||||
const pins = JSON.parse(JSON.stringify(SettingsData.brightnessDevicePins || {}))
|
||||
if (pins[screenName]) {
|
||||
delete pins[screenName]
|
||||
SettingsData.setBrightnessDevicePins(pins)
|
||||
}
|
||||
}
|
||||
currentDeviceName = modelData.name
|
||||
deviceNameChanged(modelData.name)
|
||||
}
|
||||
|
||||
@@ -145,7 +145,10 @@ Row {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: parent.width - (Theme.iconSize + Theme.spacingS * 2)
|
||||
enabled: DisplayService.brightnessAvailable && targetDeviceName.length > 0
|
||||
minimum: 1
|
||||
minimum: {
|
||||
if (!targetDevice) return 1
|
||||
return (targetDevice.class === "backlight" || targetDevice.class === "ddc") ? 1 : 0
|
||||
}
|
||||
maximum: 100
|
||||
value: targetBrightness
|
||||
onSliderValueChanged: function (newValue) {
|
||||
|
||||
Reference in New Issue
Block a user