diff --git a/app/styles/base.css b/app/styles/base.css index c45ca2ca..e97c2905 100644 --- a/app/styles/base.css +++ b/app/styles/base.css @@ -1281,13 +1281,16 @@ a:visited { display: flex; justify-content: space-between; } -#noVNC_displays .arrange-buttons button { +#noVNC_displays .arrange-buttons button, #noVNC_displays .arrange-buttons .button { border: none; display: flex; align-items: center; padding: 4px 7px; border-radius: 5px; cursor: pointer; + background-color: #f1f1f1; + font-size: 13px; + border: 1px solid #e5e5e5; } #noVNC_refreshMonitors { position: absolute; @@ -1299,8 +1302,9 @@ a:visited { transform-origin: center; } #noVNC_addMonitor { - background-color: #2196F3; + background-color: #2196F3!important; color: white; + border: none!important; } #noVNC_addMonitor svg { margin-right: 5px; diff --git a/app/ui.js b/app/ui.js index 712f63e9..3a1270af 100644 --- a/app/ui.js +++ b/app/ui.js @@ -1912,6 +1912,7 @@ const UI = { m.x += startLeft m.y += startTop } + UI.setScreenPlan() }, removeSpaces() { @@ -2002,6 +2003,30 @@ const UI = { return { top, left, width, height, startLeft, startTop } }, + setScreenPlan() { + let monitors = UI.monitors + const { scale } = UI.multiMonitorSettings() + const { top, left, width, height } = UI.getSizes(monitors) + const screens = [] + for (var i = 0; i < monitors.length; i++) { + var a = monitors[i]; + screens.push({ + screenID: a.id, + serverHeight: Math.floor(a.h * scale), + serverWidth: Math.floor(a.w * scale), + x: Math.floor((a.x - left) * scale), + y: Math.floor((a.y - top) * scale) + }) + } + const screenPlan = { + serverHeight: Math.floor(height * scale), + serverWidth: Math.floor(width * scale), + screens + } + UI.rfb.applyScreenPlan(screenPlan); + }, + + displayMonitors() { const { canvas, ctx, bb, canvasWidth, canvasHeight, scale } = UI.multiMonitorSettings() @@ -2053,7 +2078,6 @@ const UI = { monitors[i].isDragging = false; } UI.recenter() - const screenplan = setScreenPlan() UI.draw() } function myMove(e) { @@ -2096,29 +2120,6 @@ const UI = { } } - - function setScreenPlan() { - let monitors = UI.monitors - const { top, left, width, height } = UI.getSizes(monitors) - const screens = [] - for (var i = 0; i < monitors.length; i++) { - var a = monitors[i]; - screens.push({ - screenID: a.id, - serverHeight: Math.floor(a.h * scale), - serverWidth: Math.floor(a.w * scale), - x: Math.floor((a.x - left) * scale), - y: Math.floor((a.y - top) * scale) - }) - } - const screenPlan = { - serverHeight: Math.floor(height * scale), - serverWidth: Math.floor(width * scale), - screens - } - UI.rfb.applyScreenPlan(screenPlan); - } - }, diff --git a/vnc.html b/vnc.html index 865686d1..1ccc0354 100644 --- a/vnc.html +++ b/vnc.html @@ -299,12 +299,6 @@
-