On Mon, Sep 7, 2015 at 6:00 AM, Richard Hipp <[email protected]> wrote:
>> On Sat, Sep 5, 2015 at 2:49 PM, Florian Balmer <[email protected]>
>> wrote:
>>> I'd be happy if these small adaptations could be made.
> See https://www.fossil-scm.org/fossil/artifact/005c758d3?ln=596-625
> for details. Please do feel free to enhance it.
Can you try out this patch, Mr. Balmer:
Index: src/timeline.c
==================================================================
--- src/timeline.c
+++ src/timeline.c
@@ -599,17 +599,23 @@
*/
static const char *bg_to_fg(const char *zIn){
int i;
unsigned int x[3];
unsigned int mx = 0;
+ unsigned int zInLen = strlen(zIn);
static int whiteFg = -1;
static char zRes[10];
- if( strlen(zIn)!=7 || zIn[0]!='#' ) return zIn;
+ if( (zInLen!=7 && zInLen!=4) || zIn[0]!='#' ) return zIn;
zIn++;
for(i=0; i<3; i++){
- x[i] = hex_digit_value(zIn[0])*16 + hex_digit_value(zIn[1]);
- zIn += 2;
+ if (zInLen==7) {
+ x[i] = hex_digit_value(zIn[0])*16 + hex_digit_value(zIn[1]);
+ zIn += 2;
+ } else {
+ x[i] = hex_digit_value(zIn[0])*17;
+ zIn++;
+ }
if( x[i]>mx ) mx = x[i];
}
if( whiteFg<0 ) whiteFg = skin_detail_boolean("white-foreground");
if( whiteFg ){
/* Make the color lighter */
--
Rich
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users