From 9a86a595fff3e81bceb5d7b5ff3c22ddcb41afc6 Mon Sep 17 00:00:00 2001 From: rustdesk Date: Mon, 26 Jul 2021 01:50:47 +0800 Subject: [PATCH] fix compatibility issue for new sciter --- src/ui/header.css | 8 +++++++- src/ui/header.tis | 6 +++++- src/ui/remote.css | 3 +-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/ui/header.css b/src/ui/header.css index d0329008e..f7f03d908 100644 --- a/src/ui/header.css +++ b/src/ui/header.css @@ -19,6 +19,12 @@ header #screen { color: color(light-text); } +@media platform == "OSX" { + header #screen { + line-height: 11px; + } +} + header #secure { position: absolute; left: -10px; @@ -64,4 +70,4 @@ span#fullscreen.active { button:disabled { opacity: 0.3; -} \ No newline at end of file +} diff --git a/src/ui/header.tis b/src/ui/header.tis index 2c3f39131..1fc472b7e 100644 --- a/src/ui/header.tis +++ b/src/ui/header.tis @@ -168,11 +168,15 @@ class Header: Reactor.Component { var scale = 16. / h; var screens = pi.displays.map(function(d, i) { var min_wh = d.width > d.height ? d.height : d.width; + var fs = min_wh * 0.9 * scale; var style = "width:" + (d.width * scale) + "px;" + "height:" + (d.height * scale) + "px;" + "left:" + ((d.x - x0) * scale) + "px;" + "top:" + ((d.y - y0) * scale) + "px;" + - "font-size:" + (min_wh * 0.9 * scale) + "px;"; + "font-size:" + fs + "px;"; + if (is_osx) { + style += "line-height:" + fs + "px;"; + } return
{i+1}
; }); diff --git a/src/ui/remote.css b/src/ui/remote.css index 8ceab6791..617285e9c 100644 --- a/src/ui/remote.css +++ b/src/ui/remote.css @@ -14,7 +14,6 @@ video#handler { size: *; margin: *; foreground-size: contain; - position: relative; } img#cursor { @@ -34,4 +33,4 @@ table#remote-folder-view { table#local-folder-view { context-menu: selector(menu#local-folder-view); -} \ No newline at end of file +}