forked from Shinonome/dots-hyprland
fix(brightness): prevent bus number collision for identical monitor m… (#2077)
This commit is contained in:
@@ -74,8 +74,14 @@ Singleton {
|
||||
id: monitor
|
||||
|
||||
required property ShellScreen screen
|
||||
readonly property bool isDdc: root.ddcMonitors.some(m => m.model === screen.model)
|
||||
readonly property string busNum: root.ddcMonitors.find(m => m.model === screen.model)?.busNum ?? ""
|
||||
readonly property bool isDdc: {
|
||||
const match = root.ddcMonitors.find(m => m.model === screen.model && !root.monitors.slice(0, root.monitors.indexOf(this)).some(mon => mon.busNum === m.busNum));
|
||||
return !!match;
|
||||
}
|
||||
readonly property string busNum: {
|
||||
const match = root.ddcMonitors.find(m => m.model === screen.model && !root.monitors.slice(0, root.monitors.indexOf(this)).some(mon => mon.busNum === m.busNum));
|
||||
return match?.busNum ?? "";
|
||||
}
|
||||
property int rawMaxBrightness: 100
|
||||
property real brightness
|
||||
property bool ready: false
|
||||
|
||||
Reference in New Issue
Block a user