#165 ✓resolved
Steven Michalske

Make the WC head have a unique bold color, instead of bold text.

Reported by Steven Michalske | June 8th, 2009 @ 01:30 PM | in 0.7

because the bold text for current branch "HEAD"

I made this patch to have it show as red-orange and used text color appropriate for red-orange

---------- BEGIN PATCH -------------

From e3a34d812b2d67b0c10a0f543defd9c9c48339a2 Mon Sep 17 00:00:00 2001
From: Steven Michalske <smichalske@gmail.com>
Date: Mon, 8 Jun 2009 04:16:21 -0700
Subject: [PATCH] Replace BOLD with a different color for HEAD


Because I could not identify the BOLD test easily en ough when visualizing all branches, I modified the color of the tags.


I would prefer to ADD a HEAD tag instead as it is robust for the

colorblind.




PBGitRevisionCell.m | 20 ++++++++++++++------ html/views/history/history.css | 3 ++- 2 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/PBGitRevisionCell.m b/PBGitRevisionCell.m index 7d0d079..510b543 100644 --- a/PBGitRevisionCell.m +++ b/PBGitRevisionCell.m @@ -114,10 +114,7 @@ - (NSMutableDictionary*) attributesForRefLabelSelected: (BOOL) selected isCurren
NSMutableParagraphStyle* style = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] autorelease];
NSString *fontName;


  • if(curBranch)
  • fontName = @&quot;Helvetica-Bold&quot;;
    
  • else
  • fontName = @&quot;Helvetica&quot;;
    
  • fontName = @"Helvetica";

    [style setAlignment:NSCenterTextAlignment]; [attributes setObject:style forKey:NSParagraphStyleAttributeName]; @@ -126,6 +123,9 @@ - (NSMutableDictionary*) attributesForRefLabelSelected: (BOOL) selected isCurren //if (selected) // [attributes setObject:[NSColor alternateSelectedControlTextColor] forKey:NSForegroundColorAttributeName];

  • if (curBranch)

  • [attributes setObject:[NSColor colorWithCalibratedRed: 0Xff/256.0 green:0Xff/256.0 blue: 0Xff/256.0 alpha: 1.0] forKey:NSForegroundColorAttributeName];
    
    + return attributes; }




@@ -179,11 +179,19 @@ - (void) drawLabelAtIndex:(int)index inRect:(NSRect)rect
NSMutableDictionary* attributes = [self attributesForRefLabelSelected:[self isHighlighted]
                                                      isCurrentBranch:isCurBranch];
NSBezierPath *border = [NSBezierPath bezierPathWithRoundedRect:rect cornerRadius: 2.0];


  • [[self colorForRef:ref] set];
  • if ( isCurBranch ) {
  • // Make the current branch have a distinct color.  Bold just dosen't cut it.
    
  • [[NSColor colorWithCalibratedRed: 0Xff/256.0 green:0X45/256.0 blue: 0X00/256.0 alpha: 1.0] set];
    
  • } else {
  • [[self colorForRef:ref] set];
    
  • } [border fill];

    [[ref shortName] drawInRect:rect withAttributes:attributes];

  • [border stroke];
    +
  • // Set the forground for the outline to black.
  • [[NSColor blackColor] set];
  • [border stroke]; }

  • (void) drawRefsInRect: (NSRect *)refRect diff --git a/html/views/history/history.css b/html/views/history/history.css index ff505aa..d26f348 100644 --- a/html/views/history/history.css +++ b/html/views/history/history.css @@ -135,7 +135,8 @@ a.showdiff { }





.refs.currentBranch { - font-weight: bold; + background-color: #ff4500; + color: #ffffff; }
div.button -- 1.6.2

Comments and changes to this ticket

  • Pieter de Bie

    Pieter de Bie June 8th, 2009 @ 01:46 PM

    Hey,

    I like the idea, but I don't really like the colours :). Can't we use
    something a bit lighter, so we can keep the black text colour for all
    refs? Also, changing the background colour should go into the
    colorForRef: method. Finally, you can clean up the fontName stuff
    (simplify it even further)

  • Steven Michalske

    Steven Michalske June 8th, 2009 @ 08:31 PM

    Well, you can use which ever colors you like, I wanted a bold dark color, which required a light text color.

    I didn't want to change color for ref, by adding another argument. I will if it wont affect code in other places.

  • Steven Michalske

    Steven Michalske June 8th, 2009 @ 08:35 PM

    RGB color FF 70 90 might be a better choice for using dark text.

  • Steven Michalske

    Steven Michalske June 8th, 2009 @ 08:58 PM

    Here is the cleanup you requested, with a light orange tag for HEAD

    From 0775bba98870afd1aeba40dc2ac6c26e00fe7380 Mon Sep 17 00:00:00 2001
    From: Steven Michalske <smichalske@gmail.com>
    Date: Mon, 8 Jun 2009 11:54:04 -0700
    Subject: [PATCH] Replace BOLD with a different color for HEAD
    
    Because I could not identify the BOLD text easily when
    visualizing all branches, I modified the color of the tags.
    
    I would prefer to ADD a HEAD tag instead as it is robust for the
    colorblind.
    ---
     PBGitRevisionCell.m            |   13 ++++++-------
     html/views/history/history.css |    2 +-
     2 files changed, 7 insertions(+), 8 deletions(-)
    
    diff --git a/PBGitRevisionCell.m b/PBGitRevisionCell.m
    index 7d0d079..832fa1c 100644
    --- a/PBGitRevisionCell.m
    +++ b/PBGitRevisionCell.m
    @@ -112,16 +112,10 @@ - (NSMutableDictionary*) attributesForRefLabelSelected: (BOOL) selected isCurren
     {
        NSMutableDictionary *attributes = [[[NSMutableDictionary alloc] initWithCapacity:2] autorelease];
        NSMutableParagraphStyle* style = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] autorelease];
    -   NSString *fontName;
    -
    -   if(curBranch)
    -       fontName = @"Helvetica-Bold";
    -   else
    -       fontName = @"Helvetica";
        
        [style setAlignment:NSCenterTextAlignment];
        [attributes setObject:style forKey:NSParagraphStyleAttributeName];
    -   [attributes setObject:[NSFont fontWithName:fontName size:9] forKey:NSFontAttributeName];
    +   [attributes setObject:[NSFont fontWithName:@"Helvetica" size:9] forKey:NSFontAttributeName];
     
        //if (selected)
        //  [attributes setObject:[NSColor alternateSelectedControlTextColor] forKey:NSForegroundColorAttributeName];
    @@ -131,6 +125,11 @@ - (NSMutableDictionary*) attributesForRefLabelSelected: (BOOL) selected isCurren
     
     - (NSColor*) colorForRef: (PBGitRef*) ref
     {
    +   BOOL isCurBranch = [ref.ref isEqualToString:[[[controller repository] headRef] simpleRef]];
    +
    +   if (isCurBranch)
    +       return [NSColor colorWithCalibratedRed: 0Xff/256.0 green:0Xa0/256.0 blue: 0X00/256.0 alpha: 1.0];
    +
        NSString* type = [ref type];
        if ([type isEqualToString:@"head"])
            return [NSColor colorWithCalibratedRed: 0Xaa/256.0 green:0Xf2/256.0 blue: 0X54/256.0 alpha: 1.0];
    diff --git a/html/views/history/history.css b/html/views/history/history.css
    index ff505aa..17fc897 100644
    --- a/html/views/history/history.css
    +++ b/html/views/history/history.css
    @@ -135,7 +135,7 @@ a.showdiff {
     }
     
     .refs.currentBranch {
    -   font-weight: bold;
    +   background-color: #ffa000;
     }
     
     div.button
    -- 
    1.6.2
    
  • Johannes Gilger

    Johannes Gilger June 8th, 2009 @ 09:43 PM

    • State changed from “new” to “small”
    • Milestone set to 0.7

    Hmm, looks OK, although I don't much like the color ;)

    A thing I'd do is keep the bold font, red/orange are colors some people can't distinguish well.

  • Steven Michalske

    Steven Michalske June 8th, 2009 @ 10:23 PM

    instead of rounded rectangles for labels shapes should be used then.

    
     ______
    /      \
    \______/   is a tag
    
     ______
    (______)  round caps  remote
    

    some other shape for HEAD

    and as it is with rounded corners for normal

    or add a leading Letter

    C - for current HEAD
    H - for a head
    T for a tag
    R for remote

    RT would be Remote Tag

  • Johannes Gilger

    Johannes Gilger June 9th, 2009 @ 09:37 PM

    Hm, the sound of that idea doesn't really appeal to me, but maybe it's just because it can imagine it visually. If you can create a patch which demonstrates that I'd be happy to look at it (if it isn't too much work for you in case it might get rejected). I'm talking about the shape of the labels, not about adding a letter, which I think is a bad idea. I'm also against an extra label for HEAD, but ultimately this is up for Pieter to decide.

    Otherwise I'd say we should just take the orange label, keep the bold font though, and apply the whole thing to master.

    Thanks for your work in advance either way ;)

  • Pieter de Bie

    Pieter de Bie June 9th, 2009 @ 10:25 PM

    I haven't looked at the orange yet, but the patch looks good
    otherwise. I kinda like the idea of the label shape, but it depends on
    the end result. Like Johannes says, if you create a patch and it looks
    good, we can just put it in :). At some point we'll probably have to
    refacter the isCurBranch stuff (and rename it to isHEAD or something),
    but that can be part of another patch.

    I'll try to summon some strength this week and look at the end result :)

  • Pieter de Bie

    Pieter de Bie June 11th, 2009 @ 06:51 PM

    I guess this is mostly bikeshedding, but what about #fca64f as a colour? I think it's a bit lighter and easier on the eye

  • Steven Michalske
  • Pieter de Bie

    Pieter de Bie June 11th, 2009 @ 08:51 PM

    • State changed from “small” to “resolved”
  • Pieter de Bie

    Pieter de Bie June 11th, 2009 @ 08:51 PM

    Ok, committed in 58ac6ed1ff (HistoryView: Change the way the HEAD is
    displayed). thanks!

  • abigailcorkett (at gmail)

    abigailcorkett (at gmail) December 4th, 2019 @ 08:53 PM

    We are Fix My issue technical support team Which provides ESPn Activation, roku Activation, Cbs Activation support On call or via chat support

    Espn Activation

    Espn.com/activate

    Espn.com/activation

    Espn Activate

    ROku Activation

    ROku.com/links

  • GEOspatial

    GEOspatial June 30th, 2020 @ 08:07 AM

    We at Marvel Geospatial, provide you with an ultimate Geospatial Solution with our accurate data mapping and management services. Marvel brings horizontal and vertical integration of Satellite/Aerial Remote Sensing, Positioning Applications, Photogrammetry, GIS Databases and Applications, GIS Web-services and Networking of GIS Databases.Marvel offers expert advice and reliable data for all geospatial needs. Discover what’s possible with Marvel. Give us a call today for a free consultation!
    Our services :
    GIS Engineer BIM Services

    Scan to BIM Modelling services

  • GEOspatial

    GEOspatial June 30th, 2020 @ 08:07 AM

    We at Marvel Geospatial, provide you with an ultimate Geospatial Solution with our accurate data mapping and management services. Marvel brings horizontal and vertical integration of Satellite/Aerial Remote Sensing, Positioning Applications, Photogrammetry, GIS Databases and Applications, GIS Web-services and Networking of GIS Databases.Marvel offers expert advice and reliable data for all geospatial needs. Discover what’s possible with Marvel. Give us a call today for a free consultation!
    Our services :
    GIS Engineer BIM Services

    Scan to BIM Modelling services

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

GitX is the nice-looking gitk clone for OS X

Pages