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.
Commit
ab8c304a9d9fc5961d7ac49ef16e8f779b48a604
Parent
b63ba2ac9499f30…
1 file changed
+5
-5
+5
-5
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -2278,12 +2278,12 @@ | ||
| 2278 | 2278 | cgi_printf("'>%s</a>", zTimeframe); |
| 2279 | 2279 | } |
| 2280 | 2280 | @ </td><td>%d(nCount)</td> |
| 2281 | 2281 | @ <td> |
| 2282 | 2282 | @ <div class='statistics-report-graph-line' |
| 2283 | - @ style='height:16px;width:%d(nSize)%%;'> | |
| 2284 | - @ </div></td> | |
| 2283 | + @ style='width:%d(nSize)%%;'> </div> | |
| 2284 | + @ </td> | |
| 2285 | 2285 | @</tr> |
| 2286 | 2286 | if(includeWeeks){ |
| 2287 | 2287 | /* This part works fine for months but it terribly slow (4.5s on my PC), |
| 2288 | 2288 | so it's only shown for by-year for now. Suggestions/patches for |
| 2289 | 2289 | a better/faster layout are welcomed. */ |
| @@ -2373,12 +2373,12 @@ | ||
| 2373 | 2373 | @ <td> |
| 2374 | 2374 | @ <a href="?view=bymonth&user=%h(zUser)&type=%c((char)statsReportType)">%h(zUser)</a> |
| 2375 | 2375 | @ </td><td>%d(nCount)</td> |
| 2376 | 2376 | @ <td> |
| 2377 | 2377 | @ <div class='statistics-report-graph-line' |
| 2378 | - @ style='height:16px;width:%d(nSize)%%;'> | |
| 2379 | - @ </div></td> | |
| 2378 | + @ style='width:%d(nSize)%%;'> </div> | |
| 2379 | + @ </td> | |
| 2380 | 2380 | @</tr> |
| 2381 | 2381 | /* |
| 2382 | 2382 | Potential improvement: calculate the min/max event counts and |
| 2383 | 2383 | use percent-based graph bars. |
| 2384 | 2384 | */ |
| @@ -2502,11 +2502,11 @@ | ||
| 2502 | 2502 | |
| 2503 | 2503 | cgi_printf("<td>%d</td>",nCount); |
| 2504 | 2504 | cgi_printf("<td>"); |
| 2505 | 2505 | if(nCount){ |
| 2506 | 2506 | cgi_printf("<div class='statistics-report-graph-line'" |
| 2507 | - "style='height:16px;width:%d%%;'></div>", | |
| 2507 | + "style='width:%d%%;'> </div>", | |
| 2508 | 2508 | nSize); |
| 2509 | 2509 | } |
| 2510 | 2510 | cgi_printf("</td></tr>"); |
| 2511 | 2511 | } |
| 2512 | 2512 | db_finalize(&stWeek); |
| 2513 | 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='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)%%;'> </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)%%;'> </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%%;'> </div>", |
| 2508 | nSize); |
| 2509 | } |
| 2510 | cgi_printf("</td></tr>"); |
| 2511 | } |
| 2512 | db_finalize(&stWeek); |
| 2513 |