Fossil SCM
Provide a much larger palette of predefind background colors on the Checkin-Edit screen.
Commit
ddf5f367652bf7e9e5416dab3c67ef83a3f2ef6e
Parent
3789c44bb50b198…
1 file changed
+44
-18
+44
-18
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -1304,22 +1304,46 @@ | ||
| 1304 | 1304 | static const struct SampleColors { |
| 1305 | 1305 | const char *zCName; |
| 1306 | 1306 | const char *zColor; |
| 1307 | 1307 | } aColor[] = { |
| 1308 | 1308 | { "(none)", "" }, |
| 1309 | - { "#f2dcdc", "#f2dcdc" }, | |
| 1310 | - { "#f0ffc0", "#f0ffc0" }, | |
| 1311 | - { "#bde5d6", "#bde5d6" }, | |
| 1312 | - { "#c0ffc0", "#c0ffc0" }, | |
| 1313 | - { "#c0fff0", "#c0fff0" }, | |
| 1314 | - { "#c0f0ff", "#c0f0ff" }, | |
| 1315 | - { "#d0c0ff", "#d0c0ff" }, | |
| 1316 | - { "#ffc0ff", "#ffc0ff" }, | |
| 1317 | - { "#ffc0d0", "#ffc0d0" }, | |
| 1318 | - { "#fff0c0", "#fff0c0" }, | |
| 1319 | - { "#c0c0c0", "#c0c0c0" }, | |
| 1320 | - { "custom", "##" }, | |
| 1309 | + { "#f2dcdc", 0 }, | |
| 1310 | + { "#bde5d6", 0 }, | |
| 1311 | + { "#a0a0a0", 0 }, | |
| 1312 | + { "#b0b0b0", 0 }, | |
| 1313 | + { "#c0c0c0", 0 }, | |
| 1314 | + { "#d0d0d0", 0 }, | |
| 1315 | + { "#e0e0e0", 0 }, | |
| 1316 | + | |
| 1317 | + { "#c0ffc0", 0 }, | |
| 1318 | + { "#c0fff0", 0 }, | |
| 1319 | + { "#c0f0ff", 0 }, | |
| 1320 | + { "#d0c0ff", 0 }, | |
| 1321 | + { "#ffc0ff", 0 }, | |
| 1322 | + { "#ffc0d0", 0 }, | |
| 1323 | + { "#fff0c0", 0 }, | |
| 1324 | + { "#f0ffc0", 0 }, | |
| 1325 | + | |
| 1326 | + { "#a8d3c0", 0 }, | |
| 1327 | + { "#a8c7d3", 0 }, | |
| 1328 | + { "#aaa8d3", 0 }, | |
| 1329 | + { "#cba8d3", 0 }, | |
| 1330 | + { "#d3a8bc", 0 }, | |
| 1331 | + { "#d3b5a8", 0 }, | |
| 1332 | + { "#d1d3a8", 0 }, | |
| 1333 | + { "#b1d3a8", 0 }, | |
| 1334 | + | |
| 1335 | + { "#8eb2a1", 0 }, | |
| 1336 | + { "#8ea7b2", 0 }, | |
| 1337 | + { "#8f8eb2", 0 }, | |
| 1338 | + { "#ab8eb2", 0 }, | |
| 1339 | + { "#b28e9e", 0 }, | |
| 1340 | + { "#b2988e", 0 }, | |
| 1341 | + { "#b0b28e", 0 }, | |
| 1342 | + { "#95b28e", 0 }, | |
| 1343 | + | |
| 1344 | + { "custom", "##" }, | |
| 1321 | 1345 | }; |
| 1322 | 1346 | int nColor = sizeof(aColor)/sizeof(aColor[0])-1; |
| 1323 | 1347 | int stdClrFound = 0; |
| 1324 | 1348 | int i; |
| 1325 | 1349 | |
| @@ -1333,24 +1357,26 @@ | ||
| 1333 | 1357 | } |
| 1334 | 1358 | @ Propagate color to descendants</td></tr> |
| 1335 | 1359 | } |
| 1336 | 1360 | @ <tr> |
| 1337 | 1361 | for(i=0; i<nColor; i++){ |
| 1338 | - if( aColor[i].zColor[0] ){ | |
| 1339 | - @ <td style="background-color: %h(aColor[i].zColor);"> | |
| 1362 | + const char *zClr = aColor[i].zColor; | |
| 1363 | + if( zClr==0 ) zClr = aColor[i].zCName; | |
| 1364 | + if( zClr[0] ){ | |
| 1365 | + @ <td style="background-color: %h(zClr);"> | |
| 1340 | 1366 | }else{ |
| 1341 | 1367 | @ <td> |
| 1342 | 1368 | } |
| 1343 | - if( fossil_strcmp(zDefaultColor, aColor[i].zColor)==0 ){ | |
| 1344 | - @ <input type="radio" name="%s(zId)" value="%h(aColor[i].zColor)" | |
| 1369 | + if( fossil_strcmp(zDefaultColor, zClr)==0 ){ | |
| 1370 | + @ <input type="radio" name="%s(zId)" value="%h(zClr)" | |
| 1345 | 1371 | @ checked="checked" /> |
| 1346 | 1372 | stdClrFound=1; |
| 1347 | 1373 | }else{ |
| 1348 | - @ <input type="radio" name="%s(zId)" value="%h(aColor[i].zColor)" /> | |
| 1374 | + @ <input type="radio" name="%s(zId)" value="%h(zClr)" /> | |
| 1349 | 1375 | } |
| 1350 | 1376 | @ %h(aColor[i].zCName)</td> |
| 1351 | - if( (i%6)==5 && i+1<nColor ){ | |
| 1377 | + if( (i%8)==7 && i+1<nColor ){ | |
| 1352 | 1378 | @ </tr><tr> |
| 1353 | 1379 | } |
| 1354 | 1380 | } |
| 1355 | 1381 | @ </tr><tr> |
| 1356 | 1382 | if (stdClrFound){ |
| 1357 | 1383 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -1304,22 +1304,46 @@ | |
| 1304 | static const struct SampleColors { |
| 1305 | const char *zCName; |
| 1306 | const char *zColor; |
| 1307 | } aColor[] = { |
| 1308 | { "(none)", "" }, |
| 1309 | { "#f2dcdc", "#f2dcdc" }, |
| 1310 | { "#f0ffc0", "#f0ffc0" }, |
| 1311 | { "#bde5d6", "#bde5d6" }, |
| 1312 | { "#c0ffc0", "#c0ffc0" }, |
| 1313 | { "#c0fff0", "#c0fff0" }, |
| 1314 | { "#c0f0ff", "#c0f0ff" }, |
| 1315 | { "#d0c0ff", "#d0c0ff" }, |
| 1316 | { "#ffc0ff", "#ffc0ff" }, |
| 1317 | { "#ffc0d0", "#ffc0d0" }, |
| 1318 | { "#fff0c0", "#fff0c0" }, |
| 1319 | { "#c0c0c0", "#c0c0c0" }, |
| 1320 | { "custom", "##" }, |
| 1321 | }; |
| 1322 | int nColor = sizeof(aColor)/sizeof(aColor[0])-1; |
| 1323 | int stdClrFound = 0; |
| 1324 | int i; |
| 1325 | |
| @@ -1333,24 +1357,26 @@ | |
| 1333 | } |
| 1334 | @ Propagate color to descendants</td></tr> |
| 1335 | } |
| 1336 | @ <tr> |
| 1337 | for(i=0; i<nColor; i++){ |
| 1338 | if( aColor[i].zColor[0] ){ |
| 1339 | @ <td style="background-color: %h(aColor[i].zColor);"> |
| 1340 | }else{ |
| 1341 | @ <td> |
| 1342 | } |
| 1343 | if( fossil_strcmp(zDefaultColor, aColor[i].zColor)==0 ){ |
| 1344 | @ <input type="radio" name="%s(zId)" value="%h(aColor[i].zColor)" |
| 1345 | @ checked="checked" /> |
| 1346 | stdClrFound=1; |
| 1347 | }else{ |
| 1348 | @ <input type="radio" name="%s(zId)" value="%h(aColor[i].zColor)" /> |
| 1349 | } |
| 1350 | @ %h(aColor[i].zCName)</td> |
| 1351 | if( (i%6)==5 && i+1<nColor ){ |
| 1352 | @ </tr><tr> |
| 1353 | } |
| 1354 | } |
| 1355 | @ </tr><tr> |
| 1356 | if (stdClrFound){ |
| 1357 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -1304,22 +1304,46 @@ | |
| 1304 | static const struct SampleColors { |
| 1305 | const char *zCName; |
| 1306 | const char *zColor; |
| 1307 | } aColor[] = { |
| 1308 | { "(none)", "" }, |
| 1309 | { "#f2dcdc", 0 }, |
| 1310 | { "#bde5d6", 0 }, |
| 1311 | { "#a0a0a0", 0 }, |
| 1312 | { "#b0b0b0", 0 }, |
| 1313 | { "#c0c0c0", 0 }, |
| 1314 | { "#d0d0d0", 0 }, |
| 1315 | { "#e0e0e0", 0 }, |
| 1316 | |
| 1317 | { "#c0ffc0", 0 }, |
| 1318 | { "#c0fff0", 0 }, |
| 1319 | { "#c0f0ff", 0 }, |
| 1320 | { "#d0c0ff", 0 }, |
| 1321 | { "#ffc0ff", 0 }, |
| 1322 | { "#ffc0d0", 0 }, |
| 1323 | { "#fff0c0", 0 }, |
| 1324 | { "#f0ffc0", 0 }, |
| 1325 | |
| 1326 | { "#a8d3c0", 0 }, |
| 1327 | { "#a8c7d3", 0 }, |
| 1328 | { "#aaa8d3", 0 }, |
| 1329 | { "#cba8d3", 0 }, |
| 1330 | { "#d3a8bc", 0 }, |
| 1331 | { "#d3b5a8", 0 }, |
| 1332 | { "#d1d3a8", 0 }, |
| 1333 | { "#b1d3a8", 0 }, |
| 1334 | |
| 1335 | { "#8eb2a1", 0 }, |
| 1336 | { "#8ea7b2", 0 }, |
| 1337 | { "#8f8eb2", 0 }, |
| 1338 | { "#ab8eb2", 0 }, |
| 1339 | { "#b28e9e", 0 }, |
| 1340 | { "#b2988e", 0 }, |
| 1341 | { "#b0b28e", 0 }, |
| 1342 | { "#95b28e", 0 }, |
| 1343 | |
| 1344 | { "custom", "##" }, |
| 1345 | }; |
| 1346 | int nColor = sizeof(aColor)/sizeof(aColor[0])-1; |
| 1347 | int stdClrFound = 0; |
| 1348 | int i; |
| 1349 | |
| @@ -1333,24 +1357,26 @@ | |
| 1357 | } |
| 1358 | @ Propagate color to descendants</td></tr> |
| 1359 | } |
| 1360 | @ <tr> |
| 1361 | for(i=0; i<nColor; i++){ |
| 1362 | const char *zClr = aColor[i].zColor; |
| 1363 | if( zClr==0 ) zClr = aColor[i].zCName; |
| 1364 | if( zClr[0] ){ |
| 1365 | @ <td style="background-color: %h(zClr);"> |
| 1366 | }else{ |
| 1367 | @ <td> |
| 1368 | } |
| 1369 | if( fossil_strcmp(zDefaultColor, zClr)==0 ){ |
| 1370 | @ <input type="radio" name="%s(zId)" value="%h(zClr)" |
| 1371 | @ checked="checked" /> |
| 1372 | stdClrFound=1; |
| 1373 | }else{ |
| 1374 | @ <input type="radio" name="%s(zId)" value="%h(zClr)" /> |
| 1375 | } |
| 1376 | @ %h(aColor[i].zCName)</td> |
| 1377 | if( (i%8)==7 && i+1<nColor ){ |
| 1378 | @ </tr><tr> |
| 1379 | } |
| 1380 | } |
| 1381 | @ </tr><tr> |
| 1382 | if (stdClrFound){ |
| 1383 |