limit each column of the files table to screen width

This commit is contained in:
ed 2023-08-16 03:55:53 +00:00
parent 2b6a3afd38
commit 0a48acf6be
3 changed files with 21 additions and 5 deletions

View file

@ -731,14 +731,13 @@ html.y #files thead th {
margin: 0;
padding: .3em .5em;
background: var(--bg);
max-width: var(--file-td-w);
word-wrap: break-word;
overflow: hidden;
}
#files tr:nth-child(2n) td {
background: var(--row-alt);
}
#files td+td+td {
max-width: 30em;
overflow: hidden;
}
#files td+td {
box-shadow: 1px 0 0 0 rgba(128,128,128,var(--f-sh1)) inset, 0 1px 0 rgba(255,255,255,var(--f-sh2)) inset, 0 -1px 0 rgba(255,255,255,var(--f-sh2)) inset;
}

View file

@ -5207,6 +5207,23 @@ function aligngriditems() {
onresize100.add(aligngriditems);
var filecolwidth = (function () {
var lastwidth = -1;
return function () {
var vw = window.innerWidth / parseFloat(getComputedStyle(document.body)['font-size']),
w = Math.floor(vw - 2);
if (w == lastwidth)
return;
lastwidth = w;
document.documentElement.style.setProperty('--file-td-w', w + 'em');
}
})();
onresize100.add(filecolwidth, true);
var treectl = (function () {
var r = {
"hidden": true,

View file

@ -1103,7 +1103,7 @@ function Debounce(delay) {
return;
clearTimeout(r.timer);
r.timer = setTimeout(r.doit, r.delay);
r.timer = setTimeout(r.run, r.delay);
r.t_hit = now;
};
};