mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-08 04:09:15 -04:00
popout: fix opening popouts across monitors
cc/brightness: fix delegate bindings and pinning
This commit is contained in:
@@ -59,21 +59,19 @@ Item {
|
||||
ignoreUnknownSignals: true
|
||||
|
||||
function onDeviceNameChanged(newDeviceName) {
|
||||
if (root.expandedWidgetData && root.expandedWidgetData.id === "brightnessSlider") {
|
||||
const widgets = SettingsData.controlCenterWidgets || [];
|
||||
const newWidgets = widgets.map(w => {
|
||||
if (w.id === "brightnessSlider" && w.instanceId === root.expandedWidgetData.instanceId) {
|
||||
const updatedWidget = Object.assign({}, w);
|
||||
updatedWidget.deviceName = newDeviceName;
|
||||
return updatedWidget;
|
||||
}
|
||||
return w;
|
||||
});
|
||||
SettingsData.set("controlCenterWidgets", newWidgets);
|
||||
if (root.collapseCallback) {
|
||||
root.collapseCallback();
|
||||
}
|
||||
if (!root.expandedWidgetData || root.expandedWidgetData.id !== "brightnessSlider") {
|
||||
return;
|
||||
}
|
||||
const widgets = SettingsData.controlCenterWidgets || [];
|
||||
const newWidgets = widgets.map(w => {
|
||||
if (w.id === "brightnessSlider" && w.instanceId === root.expandedWidgetData.instanceId) {
|
||||
const updatedWidget = Object.assign({}, w);
|
||||
updatedWidget.deviceName = newDeviceName;
|
||||
return updatedWidget;
|
||||
}
|
||||
return w;
|
||||
});
|
||||
SettingsData.set("controlCenterWidgets", newWidgets);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user