Fossil SCM

Removed multiplier from the font size calculation, as it does not work with monospace font. Changed /dir font to monospace only for testing purposes, as that one is our pathological column-width case.

stephan 2020-09-20 07:41 dir-columns-revisited
Commit 7e8cb38ca25a9276846e668fb5ceb5e9db097437885370c3508f28a6d0e85828
2 files changed +1 -1 +1
+1 -1
--- src/browse.c
+++ src/browse.c
@@ -306,11 +306,11 @@
306306
}
307307
308308
/* Generate a multi-column table listing the contents of zD[]
309309
** directory.
310310
*/
311
- mxLen = db_int(12, "SELECT max(length(x)) * 0.85 "
311
+ mxLen = db_int(12, "SELECT max(length(x)) "
312312
"FROM localfiles /*scan*/");
313313
if( mxLen<12 ) mxLen = 12;
314314
mxLen += (mxLen+9)/10;
315315
db_prepare(&q, "SELECT x, u FROM localfiles ORDER BY x /*scan*/");
316316
@ <div class="columns files">
317317
--- src/browse.c
+++ src/browse.c
@@ -306,11 +306,11 @@
306 }
307
308 /* Generate a multi-column table listing the contents of zD[]
309 ** directory.
310 */
311 mxLen = db_int(12, "SELECT max(length(x)) * 0.85 "
312 "FROM localfiles /*scan*/");
313 if( mxLen<12 ) mxLen = 12;
314 mxLen += (mxLen+9)/10;
315 db_prepare(&q, "SELECT x, u FROM localfiles ORDER BY x /*scan*/");
316 @ <div class="columns files">
317
--- src/browse.c
+++ src/browse.c
@@ -306,11 +306,11 @@
306 }
307
308 /* Generate a multi-column table listing the contents of zD[]
309 ** directory.
310 */
311 mxLen = db_int(12, "SELECT max(length(x)) "
312 "FROM localfiles /*scan*/");
313 if( mxLen<12 ) mxLen = 12;
314 mxLen += (mxLen+9)/10;
315 db_prepare(&q, "SELECT x, u FROM localfiles ORDER BY x /*scan*/");
316 @ <div class="columns files">
317
--- src/default.css
+++ src/default.css
@@ -307,10 +307,11 @@
307307
display: block;
308308
background-repeat: no-repeat;
309309
background-position: 0px center;
310310
padding-left: 20px;
311311
padding-top: 2px;
312
+ font-family: monospace /* only for testing the col width calculation! */;
312313
}
313314
div.browser > span.file {
314315
background-image: url("data:image/gif;base64,R0lGODlhEAAQAJEAAP\/\/\/\
315316
yEhIf\/\/\/wAAACH5BAEHAAIALAAAAAAQABAAAAIvlIKpxqcfmgOUvoaqDSCxrEEfF14Gq\
316317
FXImJZsu73wepJzVMNxrtNTj3NATMKhpwAAOw==");
317318
--- src/default.css
+++ src/default.css
@@ -307,10 +307,11 @@
307 display: block;
308 background-repeat: no-repeat;
309 background-position: 0px center;
310 padding-left: 20px;
311 padding-top: 2px;
 
312 }
313 div.browser > span.file {
314 background-image: url("data:image/gif;base64,R0lGODlhEAAQAJEAAP\/\/\/\
315 yEhIf\/\/\/wAAACH5BAEHAAIALAAAAAAQABAAAAIvlIKpxqcfmgOUvoaqDSCxrEEfF14Gq\
316 FXImJZsu73wepJzVMNxrtNTj3NATMKhpwAAOw==");
317
--- src/default.css
+++ src/default.css
@@ -307,10 +307,11 @@
307 display: block;
308 background-repeat: no-repeat;
309 background-position: 0px center;
310 padding-left: 20px;
311 padding-top: 2px;
312 font-family: monospace /* only for testing the col width calculation! */;
313 }
314 div.browser > span.file {
315 background-image: url("data:image/gif;base64,R0lGODlhEAAQAJEAAP\/\/\/\
316 yEhIf\/\/\/wAAACH5BAEHAAIALAAAAAAQABAAAAIvlIKpxqcfmgOUvoaqDSCxrEEfF14Gq\
317 FXImJZsu73wepJzVMNxrtNTj3NATMKhpwAAOw==");
318

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button