config: lock osds spacing

This commit is contained in:
2 * r + 2 * t 2025-01-16 15:22:49 +11:00
parent 5f2febe534
commit 31056d48bd
2 changed files with 4 additions and 1 deletions

View file

@ -37,6 +37,7 @@ export const osds = {
showValue: true,
},
lock: {
spacing: 5,
caps: {
hideDelay: 1000,
},

View file

@ -294,7 +294,9 @@ class LockOsd extends Widget.Window {
if (window !== this && window instanceof LockOsd) {
const child = this.get_child();
if (!child) return;
this[right ? "marginLeft" : "marginRight"] = window.visible ? child.get_preferred_width()[1] + 5 : 0;
this[right ? "marginLeft" : "marginRight"] = window.visible
? child.get_preferred_width()[1] + config.lock.spacing
: 0;
}
});
}