Fix spacing and fractional units

This commit is contained in:
Chris Hunt 2023-10-11 08:31:08 +00:00
parent 0f4979bcc5
commit 954428d6c8
1 changed files with 15 additions and 7 deletions

View File

@ -1690,6 +1690,14 @@ const UI = {
UI.toggleIMEMode(); UI.toggleIMEMode();
} }
break; break;
case 'open_displays_mode':
if (UI.rfb) {
UI.openDisplays()
}
break;
case 'close_displays_mode':
UI.closeDisplays()
break;
case 'enable_webrtc': case 'enable_webrtc':
if (!UI.getSetting('enable_webrtc')) { if (!UI.getSetting('enable_webrtc')) {
UI.forceSetting('enable_webrtc', true, false); UI.forceSetting('enable_webrtc', true, false);
@ -2044,8 +2052,8 @@ const UI = {
for (var i = 0; i < monitors.length; i++) { for (var i = 0; i < monitors.length; i++) {
monitors[i].isDragging = false; monitors[i].isDragging = false;
} }
const screenplan = setScreenPlan()
UI.recenter() UI.recenter()
const screenplan = setScreenPlan()
UI.draw() UI.draw()
} }
function myMove(e) { function myMove(e) {
@ -2097,15 +2105,15 @@ const UI = {
var a = monitors[i]; var a = monitors[i];
screens.push({ screens.push({
screenID: a.id, screenID: a.id,
serverHeight: a.h * scale, serverHeight: Math.floor(a.h * scale),
serverWidth: a.w * scale, serverWidth: Math.floor(a.w * scale),
x: (a.x - left) * scale, x: Math.floor((a.x - left) * scale),
y: (a.y - top) * scale y: Math.floor((a.y - top) * scale)
}) })
} }
const screenPlan = { const screenPlan = {
serverHeight: height * scale, serverHeight: Math.floor(height * scale),
serverWidth: width * scale, serverWidth: Math.floor(width * scale),
screens screens
} }
UI.rfb.applyScreenPlan(screenPlan); UI.rfb.applyScreenPlan(screenPlan);