Fix monitor brightness h/l doing nothing: id shadowing root property
This commit is contained in:
@@ -109,7 +109,7 @@ Item {
|
|||||||
function adjustBrightness(delta) {
|
function adjustBrightness(delta) {
|
||||||
if (focusSection !== "brightness") return
|
if (focusSection !== "brightness") return
|
||||||
if (!brightnessAvailable) return
|
if (!brightnessAvailable) return
|
||||||
setBrightness(brightnessPercent + delta)
|
setBrightness(root.brightnessPercent + delta)
|
||||||
}
|
}
|
||||||
|
|
||||||
function activateCursor() {
|
function activateCursor() {
|
||||||
@@ -436,7 +436,7 @@ Item {
|
|||||||
PanelSlider {
|
PanelSlider {
|
||||||
id: brightnessSlider
|
id: brightnessSlider
|
||||||
bar: root.bar
|
bar: root.bar
|
||||||
width: parent.width - 22 - brightnessPercent.width - 16
|
width: parent.width - 22 - brightnessLabel.width - 16
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
minimum: 1
|
minimum: 1
|
||||||
maximum: 100
|
maximum: 100
|
||||||
@@ -451,7 +451,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: brightnessPercent
|
id: brightnessLabel
|
||||||
text: Math.round(brightnessSlider.dragging ? brightnessSlider.liveValue : root.brightnessPercent) + "%"
|
text: Math.round(brightnessSlider.dragging ? brightnessSlider.liveValue : root.brightnessPercent) + "%"
|
||||||
color: root.bar.foreground
|
color: root.bar.foreground
|
||||||
font.family: root.bar.fontFamily
|
font.family: root.bar.fontFamily
|
||||||
|
|||||||
Reference in New Issue
Block a user