Close desktop safety gaps
This commit is contained in:
@@ -22,7 +22,7 @@ SettingsPage {
|
||||
|
||||
property string selectedOutput: ""
|
||||
readonly property var monitor: Displays.monitorNamed(root.selectedOutput)
|
||||
?? (Displays.monitors.length > 0 ? Displays.monitors[0] : null)
|
||||
?? (Displays.primaryFirstMonitors.length > 0 ? Displays.primaryFirstMonitors[0] : null)
|
||||
readonly property string currentMode: root.monitor
|
||||
? root.monitor.mode
|
||||
: ""
|
||||
@@ -38,7 +38,8 @@ SettingsPage {
|
||||
|
||||
function syncSelectedOutput(): void {
|
||||
if (!Displays.monitorNamed(root.selectedOutput))
|
||||
root.selectedOutput = Displays.monitors.length > 0 ? Displays.monitors[0].name : "";
|
||||
root.selectedOutput = Displays.primaryFirstMonitors.length > 0
|
||||
? Displays.primaryFirstMonitors[0].name : "";
|
||||
}
|
||||
|
||||
// Probing I2C for DDC-capable monitors takes on the order of a second, so
|
||||
@@ -137,7 +138,7 @@ SettingsPage {
|
||||
ChoiceGrid {
|
||||
width: parent.width
|
||||
label: "Display"
|
||||
options: Displays.monitors.map(monitor => ({
|
||||
options: Displays.primaryFirstMonitors.map(monitor => ({
|
||||
value: monitor.name,
|
||||
label: monitor.description || monitor.name
|
||||
}))
|
||||
|
||||
@@ -18,6 +18,13 @@ Column {
|
||||
width: parent ? parent.width : 620
|
||||
spacing: 4
|
||||
|
||||
onOutputsChanged: root.syncSelectedOutput()
|
||||
|
||||
function syncSelectedOutput(): void {
|
||||
if (!root.outputs.includes(root.selectedOutput))
|
||||
root.selectedOutput = root.outputs.length > 0 ? root.outputs[0] : "";
|
||||
}
|
||||
|
||||
ChoiceGrid {
|
||||
width: parent.width
|
||||
label: "Wallpaper mode"
|
||||
|
||||
Reference in New Issue
Block a user