Fossil SCM

The DIV.statistics-report-graph-line elements in /reports now no longer use a fixed height, but instead inject an nbsp so that they will effectively have a height of 1em. It now adjusts nicely across skins with different font heights.

stephan 2014-02-11 18:12 trunk
Commit ab8c304a9d9fc5961d7ac49ef16e8f779b48a604
1 file changed +5 -5
+5 -5
--- src/timeline.c
+++ src/timeline.c
@@ -2278,12 +2278,12 @@
22782278
cgi_printf("'>%s</a>", zTimeframe);
22792279
}
22802280
@ </td><td>%d(nCount)</td>
22812281
@ <td>
22822282
@ <div class='statistics-report-graph-line'
2283
- @ style='height:16px;width:%d(nSize)%%;'>
2284
- @ </div></td>
2283
+ @ style='width:%d(nSize)%%;'>&nbsp;</div>
2284
+ @ </td>
22852285
@</tr>
22862286
if(includeWeeks){
22872287
/* This part works fine for months but it terribly slow (4.5s on my PC),
22882288
so it's only shown for by-year for now. Suggestions/patches for
22892289
a better/faster layout are welcomed. */
@@ -2373,12 +2373,12 @@
23732373
@ <td>
23742374
@ <a href="?view=bymonth&user=%h(zUser)&type=%c((char)statsReportType)">%h(zUser)</a>
23752375
@ </td><td>%d(nCount)</td>
23762376
@ <td>
23772377
@ <div class='statistics-report-graph-line'
2378
- @ style='height:16px;width:%d(nSize)%%;'>
2379
- @ </div></td>
2378
+ @ style='width:%d(nSize)%%;'>&nbsp;</div>
2379
+ @ </td>
23802380
@</tr>
23812381
/*
23822382
Potential improvement: calculate the min/max event counts and
23832383
use percent-based graph bars.
23842384
*/
@@ -2502,11 +2502,11 @@
25022502
25032503
cgi_printf("<td>%d</td>",nCount);
25042504
cgi_printf("<td>");
25052505
if(nCount){
25062506
cgi_printf("<div class='statistics-report-graph-line'"
2507
- "style='height:16px;width:%d%%;'></div>",
2507
+ "style='width:%d%%;'>&nbsp;</div>",
25082508
nSize);
25092509
}
25102510
cgi_printf("</td></tr>");
25112511
}
25122512
db_finalize(&stWeek);
25132513
--- src/timeline.c
+++ src/timeline.c
@@ -2278,12 +2278,12 @@
2278 cgi_printf("'>%s</a>", zTimeframe);
2279 }
2280 @ </td><td>%d(nCount)</td>
2281 @ <td>
2282 @ <div class='statistics-report-graph-line'
2283 @ style='height:16px;width:%d(nSize)%%;'>
2284 @ </div></td>
2285 @</tr>
2286 if(includeWeeks){
2287 /* This part works fine for months but it terribly slow (4.5s on my PC),
2288 so it's only shown for by-year for now. Suggestions/patches for
2289 a better/faster layout are welcomed. */
@@ -2373,12 +2373,12 @@
2373 @ <td>
2374 @ <a href="?view=bymonth&user=%h(zUser)&type=%c((char)statsReportType)">%h(zUser)</a>
2375 @ </td><td>%d(nCount)</td>
2376 @ <td>
2377 @ <div class='statistics-report-graph-line'
2378 @ style='height:16px;width:%d(nSize)%%;'>
2379 @ </div></td>
2380 @</tr>
2381 /*
2382 Potential improvement: calculate the min/max event counts and
2383 use percent-based graph bars.
2384 */
@@ -2502,11 +2502,11 @@
2502
2503 cgi_printf("<td>%d</td>",nCount);
2504 cgi_printf("<td>");
2505 if(nCount){
2506 cgi_printf("<div class='statistics-report-graph-line'"
2507 "style='height:16px;width:%d%%;'></div>",
2508 nSize);
2509 }
2510 cgi_printf("</td></tr>");
2511 }
2512 db_finalize(&stWeek);
2513
--- src/timeline.c
+++ src/timeline.c
@@ -2278,12 +2278,12 @@
2278 cgi_printf("'>%s</a>", zTimeframe);
2279 }
2280 @ </td><td>%d(nCount)</td>
2281 @ <td>
2282 @ <div class='statistics-report-graph-line'
2283 @ style='width:%d(nSize)%%;'>&nbsp;</div>
2284 @ </td>
2285 @</tr>
2286 if(includeWeeks){
2287 /* This part works fine for months but it terribly slow (4.5s on my PC),
2288 so it's only shown for by-year for now. Suggestions/patches for
2289 a better/faster layout are welcomed. */
@@ -2373,12 +2373,12 @@
2373 @ <td>
2374 @ <a href="?view=bymonth&user=%h(zUser)&type=%c((char)statsReportType)">%h(zUser)</a>
2375 @ </td><td>%d(nCount)</td>
2376 @ <td>
2377 @ <div class='statistics-report-graph-line'
2378 @ style='width:%d(nSize)%%;'>&nbsp;</div>
2379 @ </td>
2380 @</tr>
2381 /*
2382 Potential improvement: calculate the min/max event counts and
2383 use percent-based graph bars.
2384 */
@@ -2502,11 +2502,11 @@
2502
2503 cgi_printf("<td>%d</td>",nCount);
2504 cgi_printf("<td>");
2505 if(nCount){
2506 cgi_printf("<div class='statistics-report-graph-line'"
2507 "style='width:%d%%;'>&nbsp;</div>",
2508 nSize);
2509 }
2510 cgi_printf("</td></tr>");
2511 }
2512 db_finalize(&stWeek);
2513

Keyboard Shortcuts

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