allow custom dark modes with bypass
This commit is contained in:
parent
eb34d9ece8
commit
b5516c1d9e
1 changed files with 13 additions and 11 deletions
|
|
@ -1762,7 +1762,7 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function platformUpdateSize() {
|
function platformUpdateSize(updateDark = true) {
|
||||||
let dev = settings.device,
|
let dev = settings.device,
|
||||||
isBelt = dev.bedBelt,
|
isBelt = dev.bedBelt,
|
||||||
width, depth,
|
width, depth,
|
||||||
|
|
@ -1780,6 +1780,7 @@
|
||||||
unitMM = ctrl.units === 'mm',
|
unitMM = ctrl.units === 'mm',
|
||||||
gridMajor = unitMM ? 25 : 25.4,
|
gridMajor = unitMM ? 25 : 25.4,
|
||||||
gridMinor = unitMM ? 5 : 25.4 / 10;
|
gridMinor = unitMM ? 5 : 25.4 / 10;
|
||||||
|
if (updateDark) {
|
||||||
if (ctrl.dark) {
|
if (ctrl.dark) {
|
||||||
SPACE.platform.setGrid(gridMajor, gridMinor, 0x999999, 0x333333);
|
SPACE.platform.setGrid(gridMajor, gridMinor, 0x999999, 0x333333);
|
||||||
SPACE.platform.opacity(0.8);
|
SPACE.platform.opacity(0.8);
|
||||||
|
|
@ -1791,6 +1792,7 @@
|
||||||
SPACE.setSkyColor(0xffffff);
|
SPACE.setSkyColor(0xffffff);
|
||||||
DOC.body.classList.remove('dark');
|
DOC.body.classList.remove('dark');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
SPACE.platform.setRulers(ruler, ruler, 1 / unitScale(), 'X', isBelt ? 'Z' : 'Y');
|
SPACE.platform.setRulers(ruler, ruler, 1 / unitScale(), 'X', isBelt ? 'Z' : 'Y');
|
||||||
SPACE.platform.setGZOff(height/2 - 0.1);
|
SPACE.platform.setGZOff(height/2 - 0.1);
|
||||||
platform.update_origin();
|
platform.update_origin();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue