fix(ui): keep the removed Display and layout exports as deprecated shims

Restore shouldHideCollapsedRightPanels, syncScopeControls and the fadeSliders field, skipping sliders already bound by name. Note the API changes in the changelog.
This commit is contained in:
Sameh Khamis committed 2026-10-30 23:56:20 -07:00
1 parent a767b84486
commit c1dd9246eb
5 files changed
+56 -1

No files matched your search

+18
View File
@@ -67,9 +67,27 @@ export function bindDisplayControls({ elements, actions }) {
}
listen(elements.fadeSlider, 'input', 'setFade', integer);
listen(elements.outsideOpacitySlider, 'input', 'setOutsideOpacity', integer);
// Hosts written before the two sliders were told apart pass `fadeSliders`
// and read both values in `setFade` themselves.
for (const el of elements.fadeSliders || []) {
if (el === elements.fadeSlider || el === elements.outsideOpacitySlider)
continue;
listen(el, 'input', 'setFade');
}
return {
destroy() {
for (const remove of removers.splice(0)) remove();
},
};
}
/**
* Keep a native Scope checkbox and feather availability in step with the
* mask. The Display view renders both from VisualSettings now; this stays
* exported from `./ui/display` for hosts that imported it.
* @deprecated
*/
export function syncScopeControls(toggle, featherSlider, enabled) {
if (toggle) toggle.checked = enabled;
if (featherSlider) featherSlider.disabled = !enabled;
}