Show monitor hero top and hide brightness slider when no backlight
This commit is contained in:
@@ -484,7 +484,6 @@ Panel {
|
|||||||
// ---------- Hero: display icon · title/status ----------
|
// ---------- Hero: display icon · title/status ----------
|
||||||
Item {
|
Item {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
visible: root.brightnessAvailable
|
|
||||||
implicitHeight: Math.max(heroIcon.implicitHeight, heroLabels.implicitHeight)
|
implicitHeight: Math.max(heroIcon.implicitHeight, heroLabels.implicitHeight)
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
@@ -517,7 +516,13 @@ Panel {
|
|||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: heroLabel
|
id: heroLabel
|
||||||
text: root.brightnessName(brightnessSlider.dragging ? brightnessSlider.liveValue : root.brightnessPercent).toUpperCase()
|
text: {
|
||||||
|
if (root.brightnessAvailable) {
|
||||||
|
return root.brightnessName(brightnessSlider.dragging ? brightnessSlider.liveValue : root.brightnessPercent).toUpperCase()
|
||||||
|
}
|
||||||
|
var count = root.enabledDisplayCount
|
||||||
|
return (count === 1 ? "1 display" : count + " displays").toUpperCase()
|
||||||
|
}
|
||||||
color: Qt.darker(root.bar.foreground, 1.4)
|
color: Qt.darker(root.bar.foreground, 1.4)
|
||||||
font.family: root.bar.fontFamily
|
font.family: root.bar.fontFamily
|
||||||
font.pixelSize: Style.font.caption
|
font.pixelSize: Style.font.caption
|
||||||
@@ -603,14 +608,6 @@ Panel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
|
||||||
visible: !root.brightnessAvailable
|
|
||||||
text: "No controllable backlight found"
|
|
||||||
color: Qt.darker(root.bar.foreground, 1.5)
|
|
||||||
font.family: root.bar.fontFamily
|
|
||||||
font.pixelSize: Style.font.bodySmall
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------- Text size ----------
|
// ---------- Text size ----------
|
||||||
PanelSeparator {
|
PanelSeparator {
|
||||||
foreground: root.bar.foreground
|
foreground: root.bar.foreground
|
||||||
|
|||||||
Reference in New Issue
Block a user