Fossil SCM
Improved default background colors for web annotations. Remove the diff hyperlinks from the annotation log.
Commit
8987a6bbbf6b8d380c8f7069f23952a8c017208a
Parent
477d1150cf95744…
1 file changed
+9
-7
+9
-7
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -2375,17 +2375,17 @@ | ||
| 2375 | 2375 | unsigned gradient_color(unsigned c1, unsigned c2, int n, int i){ |
| 2376 | 2376 | unsigned c; /* Result color */ |
| 2377 | 2377 | unsigned x1, x2; |
| 2378 | 2378 | x1 = (c1>>16)&0xff; |
| 2379 | 2379 | x2 = (c2>>16)&0xff; |
| 2380 | - c = (x1*i + x2*(n-i))/n<<16 & 0xff0000; | |
| 2380 | + c = (x1*(n-i) + x2*i)/n<<16 & 0xff0000; | |
| 2381 | 2381 | x1 = (c1>>8)&0xff; |
| 2382 | 2382 | x2 = (c2>>8)&0xff; |
| 2383 | - c |= (x1*i + x2*(n-i))/n<<8 & 0xff00; | |
| 2383 | + c |= (x1*(n-i) + x2*i)/n<<8 & 0xff00; | |
| 2384 | 2384 | x1 = c1&0xff; |
| 2385 | 2385 | x2 = c2&0xff; |
| 2386 | - c |= (x1*i + x2*(n-i))/n & 0xff; | |
| 2386 | + c |= (x1*(n-i) + x2*i)/n & 0xff; | |
| 2387 | 2387 | return c; |
| 2388 | 2388 | } |
| 2389 | 2389 | |
| 2390 | 2390 | /* |
| 2391 | 2391 | ** WEBPAGE: annotate |
| @@ -2462,15 +2462,15 @@ | ||
| 2462 | 2462 | style_submenu_element("20 Ancestors", "20 Ancestors", |
| 2463 | 2463 | url_render(&url, "limit", "20", 0, 0)); |
| 2464 | 2464 | } |
| 2465 | 2465 | annotate_file(&ann, fnid, mid, iLimit, annFlags); |
| 2466 | 2466 | if( db_get_boolean("white-foreground", 0) ){ |
| 2467 | - clr1 = 0x000000; | |
| 2468 | - clr2 = 0x0078ff; | |
| 2467 | + clr1 = 0xa04040; | |
| 2468 | + clr2 = 0x4059a0; | |
| 2469 | 2469 | }else{ |
| 2470 | - clr1 = 0x007fff; | |
| 2471 | - clr2 = 0xf0f7ff; | |
| 2470 | + clr1 = 0xffb5b5; /* Recent changes: red (hot) */ | |
| 2471 | + clr2 = 0xb5e0ff; /* Older changes: blue (cold) */ | |
| 2472 | 2472 | } |
| 2473 | 2473 | for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){ |
| 2474 | 2474 | clr = gradient_color(clr1, clr2, ann.nVers-1, i); |
| 2475 | 2475 | ann.aVers[i].zBgColor = mprintf("#%06x", clr); |
| 2476 | 2476 | ann.aVers[i].zUser = mprintf("%h", ann.aVers[i].zUser); |
| @@ -2482,10 +2482,11 @@ | ||
| 2482 | 2482 | for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){ |
| 2483 | 2483 | @ <li><span style='background-color:%s(p->zBgColor);'>%s(p->zDate) |
| 2484 | 2484 | @ check-in %z(href("%R/info/%S",p->zMUuid))%.10s(p->zMUuid)</a> |
| 2485 | 2485 | @ artifact %z(href("%R/artifact/%S",p->zFUuid))%.10s(p->zFUuid)</a> |
| 2486 | 2486 | @ </span> |
| 2487 | +#if 0 | |
| 2487 | 2488 | if( i>0 ){ |
| 2488 | 2489 | char *zLink = xhref("target='infowindow'", |
| 2489 | 2490 | "%R/fdiff?v1=%S&v2=%S&sbs=1", |
| 2490 | 2491 | p->zFUuid,ann.aVers[0].zFUuid); |
| 2491 | 2492 | @ %z(zLink)[diff-to-top]</a> |
| @@ -2494,10 +2495,11 @@ | ||
| 2494 | 2495 | "%R/fdiff?v1=%S&v2=%S&sbs=1", |
| 2495 | 2496 | p->zFUuid,p[-1].zFUuid); |
| 2496 | 2497 | @ %z(zLink)[diff-to-previous]</a> |
| 2497 | 2498 | } |
| 2498 | 2499 | } |
| 2500 | +#endif | |
| 2499 | 2501 | } |
| 2500 | 2502 | @ </ol> |
| 2501 | 2503 | @ <hr> |
| 2502 | 2504 | } |
| 2503 | 2505 | if( iLimit<0 ){ |
| 2504 | 2506 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -2375,17 +2375,17 @@ | |
| 2375 | unsigned gradient_color(unsigned c1, unsigned c2, int n, int i){ |
| 2376 | unsigned c; /* Result color */ |
| 2377 | unsigned x1, x2; |
| 2378 | x1 = (c1>>16)&0xff; |
| 2379 | x2 = (c2>>16)&0xff; |
| 2380 | c = (x1*i + x2*(n-i))/n<<16 & 0xff0000; |
| 2381 | x1 = (c1>>8)&0xff; |
| 2382 | x2 = (c2>>8)&0xff; |
| 2383 | c |= (x1*i + x2*(n-i))/n<<8 & 0xff00; |
| 2384 | x1 = c1&0xff; |
| 2385 | x2 = c2&0xff; |
| 2386 | c |= (x1*i + x2*(n-i))/n & 0xff; |
| 2387 | return c; |
| 2388 | } |
| 2389 | |
| 2390 | /* |
| 2391 | ** WEBPAGE: annotate |
| @@ -2462,15 +2462,15 @@ | |
| 2462 | style_submenu_element("20 Ancestors", "20 Ancestors", |
| 2463 | url_render(&url, "limit", "20", 0, 0)); |
| 2464 | } |
| 2465 | annotate_file(&ann, fnid, mid, iLimit, annFlags); |
| 2466 | if( db_get_boolean("white-foreground", 0) ){ |
| 2467 | clr1 = 0x000000; |
| 2468 | clr2 = 0x0078ff; |
| 2469 | }else{ |
| 2470 | clr1 = 0x007fff; |
| 2471 | clr2 = 0xf0f7ff; |
| 2472 | } |
| 2473 | for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){ |
| 2474 | clr = gradient_color(clr1, clr2, ann.nVers-1, i); |
| 2475 | ann.aVers[i].zBgColor = mprintf("#%06x", clr); |
| 2476 | ann.aVers[i].zUser = mprintf("%h", ann.aVers[i].zUser); |
| @@ -2482,10 +2482,11 @@ | |
| 2482 | for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){ |
| 2483 | @ <li><span style='background-color:%s(p->zBgColor);'>%s(p->zDate) |
| 2484 | @ check-in %z(href("%R/info/%S",p->zMUuid))%.10s(p->zMUuid)</a> |
| 2485 | @ artifact %z(href("%R/artifact/%S",p->zFUuid))%.10s(p->zFUuid)</a> |
| 2486 | @ </span> |
| 2487 | if( i>0 ){ |
| 2488 | char *zLink = xhref("target='infowindow'", |
| 2489 | "%R/fdiff?v1=%S&v2=%S&sbs=1", |
| 2490 | p->zFUuid,ann.aVers[0].zFUuid); |
| 2491 | @ %z(zLink)[diff-to-top]</a> |
| @@ -2494,10 +2495,11 @@ | |
| 2494 | "%R/fdiff?v1=%S&v2=%S&sbs=1", |
| 2495 | p->zFUuid,p[-1].zFUuid); |
| 2496 | @ %z(zLink)[diff-to-previous]</a> |
| 2497 | } |
| 2498 | } |
| 2499 | } |
| 2500 | @ </ol> |
| 2501 | @ <hr> |
| 2502 | } |
| 2503 | if( iLimit<0 ){ |
| 2504 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -2375,17 +2375,17 @@ | |
| 2375 | unsigned gradient_color(unsigned c1, unsigned c2, int n, int i){ |
| 2376 | unsigned c; /* Result color */ |
| 2377 | unsigned x1, x2; |
| 2378 | x1 = (c1>>16)&0xff; |
| 2379 | x2 = (c2>>16)&0xff; |
| 2380 | c = (x1*(n-i) + x2*i)/n<<16 & 0xff0000; |
| 2381 | x1 = (c1>>8)&0xff; |
| 2382 | x2 = (c2>>8)&0xff; |
| 2383 | c |= (x1*(n-i) + x2*i)/n<<8 & 0xff00; |
| 2384 | x1 = c1&0xff; |
| 2385 | x2 = c2&0xff; |
| 2386 | c |= (x1*(n-i) + x2*i)/n & 0xff; |
| 2387 | return c; |
| 2388 | } |
| 2389 | |
| 2390 | /* |
| 2391 | ** WEBPAGE: annotate |
| @@ -2462,15 +2462,15 @@ | |
| 2462 | style_submenu_element("20 Ancestors", "20 Ancestors", |
| 2463 | url_render(&url, "limit", "20", 0, 0)); |
| 2464 | } |
| 2465 | annotate_file(&ann, fnid, mid, iLimit, annFlags); |
| 2466 | if( db_get_boolean("white-foreground", 0) ){ |
| 2467 | clr1 = 0xa04040; |
| 2468 | clr2 = 0x4059a0; |
| 2469 | }else{ |
| 2470 | clr1 = 0xffb5b5; /* Recent changes: red (hot) */ |
| 2471 | clr2 = 0xb5e0ff; /* Older changes: blue (cold) */ |
| 2472 | } |
| 2473 | for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){ |
| 2474 | clr = gradient_color(clr1, clr2, ann.nVers-1, i); |
| 2475 | ann.aVers[i].zBgColor = mprintf("#%06x", clr); |
| 2476 | ann.aVers[i].zUser = mprintf("%h", ann.aVers[i].zUser); |
| @@ -2482,10 +2482,11 @@ | |
| 2482 | for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){ |
| 2483 | @ <li><span style='background-color:%s(p->zBgColor);'>%s(p->zDate) |
| 2484 | @ check-in %z(href("%R/info/%S",p->zMUuid))%.10s(p->zMUuid)</a> |
| 2485 | @ artifact %z(href("%R/artifact/%S",p->zFUuid))%.10s(p->zFUuid)</a> |
| 2486 | @ </span> |
| 2487 | #if 0 |
| 2488 | if( i>0 ){ |
| 2489 | char *zLink = xhref("target='infowindow'", |
| 2490 | "%R/fdiff?v1=%S&v2=%S&sbs=1", |
| 2491 | p->zFUuid,ann.aVers[0].zFUuid); |
| 2492 | @ %z(zLink)[diff-to-top]</a> |
| @@ -2494,10 +2495,11 @@ | |
| 2495 | "%R/fdiff?v1=%S&v2=%S&sbs=1", |
| 2496 | p->zFUuid,p[-1].zFUuid); |
| 2497 | @ %z(zLink)[diff-to-previous]</a> |
| 2498 | } |
| 2499 | } |
| 2500 | #endif |
| 2501 | } |
| 2502 | @ </ol> |
| 2503 | @ <hr> |
| 2504 | } |
| 2505 | if( iLimit<0 ){ |
| 2506 |