From 58040cc0edf62044bbb062822aeb7f6da1116a7a Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 18 May 2021 03:21:53 +0200 Subject: [PATCH] fix the treesize off-by-one (*finally*) --- copyparty/web/browser.css | 2 +- copyparty/web/browser.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/copyparty/web/browser.css b/copyparty/web/browser.css index 05aaa913..3658de5b 100644 --- a/copyparty/web/browser.css +++ b/copyparty/web/browser.css @@ -527,7 +527,6 @@ input[type="checkbox"]:checked+label { left: 0; bottom: 0; top: 7em; - padding-top: .2em; overflow-y: auto; -ms-scroll-chaining: none; overscroll-behavior-y: none; @@ -575,6 +574,7 @@ input[type="checkbox"]:checked+label { #detree { padding: .3em .5em; font-size: 1.5em; + line-height: 1.5em; } #tree ul, #tree li { diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index b90d8082..679c6fa5 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -147,7 +147,7 @@ var widget = (function () { irc = this.getAttribute('id') == 'npirc', ck = irc ? '06' : '', cv = irc ? '07' : '', - m = ck + 'np: ' + cv; + m = ck + 'np: '; for (var a = 1, aa = th.length; a < aa; a++) { var tk = a == 1 ? '' : th[a].getAttribute('name').split('/').slice(-1)[0]; @@ -158,7 +158,7 @@ var widget = (function () { m += '[' + cv + s2ms(mp.au.currentTime) + ck + '/' + cv + s2ms(mp.au.duration) + ck + ']'; var o = document.createElement('input'); - o.style.cssText = 'position:fixed;top:45%;left:48%;padding:1em'; + o.style.cssText = 'position:fixed;top:45%;left:48%;padding:1em;z-index:9'; o.value = m; document.body.appendChild(o); o.focus(); @@ -1040,7 +1040,7 @@ var treectl = (function () { } else { var top = Math.max(0, parseInt(wrap.offsetTop)), - treeh = (winh - atop) - 4; + treeh = winh - atop; tree.style.top = top + 'px'; tree.style.height = treeh < 10 ? '' : treeh + 'px';