navpane: fix scrollbar overlap

This commit is contained in:
ed 2025-06-28 21:10:48 +00:00
parent 65c4e03574
commit 7ef6fd13cf
2 changed files with 12 additions and 6 deletions

View file

@ -4,6 +4,8 @@
--grid-sz: 10em;
--grid-ln: 3;
--nav-sz: 16em;
--sbw: 0.5em;
--sbh: 0.5em;
--fg: #ccc;
--fg-max: #fff;
@ -1558,8 +1560,8 @@ html {
z-index: 1;
position: fixed;
background: var(--tree-bg);
left: -.98em;
width: calc(var(--nav-sz) - 0.5em);
left: -.96em;
width: calc(.3em + var(--nav-sz) - var(--sbw));
border-bottom: 1px solid var(--bg-u5);
overflow: hidden;
}
@ -3066,7 +3068,8 @@ html.b .ntree a {
padding: .6em .2em;
}
html.b #treepar {
margin-left: .62em;
margin-left: .63em;
width: calc(.1em + var(--nav-sz) - var(--sbw));
border-bottom: .2em solid var(--f-h-b1);
}
html.b #wrap {

View file

@ -2258,14 +2258,17 @@ SPINNER = m[0];
var SBW, SBH; // scrollbar size
(function () {
function read_sbw() {
var el = mknod('div');
el.style.cssText = 'overflow:scroll;width:100px;height:100px';
el.style.cssText = 'overflow:scroll;width:100px;height:100px;position:absolute;top:0;left:0';
document.body.appendChild(el);
SBW = el.offsetWidth - el.clientWidth;
SBH = el.offsetHeight - el.clientHeight;
document.body.removeChild(el);
})();
setcvar('--sbw', SBW + 'px');
setcvar('--sbh', SBH + 'px');
}
onresize100.add(read_sbw, true);
var have_webp = sread('have_webp');