Adium

Ticket #10289: theyre_not_called_flippies.diff

File theyre_not_called_flippies.diff, 7.7 kB (added by rgovostes, 5 months ago)
  • Frameworks/AIUtilities

    old new  
    88 
    99#import "AIVariableHeightFlexibleColumnsOutlineView.h" 
    1010 
    11 #define FLIPPY_WIDTH          10 
    12 #define FLIPPY_HEIGHT         10 
    13 #define FLIPPY_TEXT_PADDING
     11#define DISCLOSURE_TRIANGLE_WIDTH                     10 
     12#define DISCLOSURE_TRIANGLE_HEIGHT                    10 
     13#define DISCLOSURE_TRIANGLE_TEXT_PADDING       
    1414 
    1515/* 
    1616 * @class AIVariableHeightFlexibleColumnsOutlineView 
     
    6868                         
    6969                         
    7070                        if (tableColumnIndex == 0) { 
    71                                 //Draw flippy triangle 
     71                                //Draw disclosure triangle 
    7272                                if ([self isExpandable:item]) { 
    7373                                         
    74                                         cellFrame.origin.x += FLIPPY_TEXT_PADDING/2; 
    75                                         cellFrame.size.width -= FLIPPY_TEXT_PADDING/2; 
     74                                        cellFrame.origin.x += DISCLOSURE_TRIANGLE_TEXT_PADDING/2; 
     75                                        cellFrame.size.width -= DISCLOSURE_TRIANGLE_TEXT_PADDING/2; 
    7676                                         
    7777                                        NSBezierPath    *arrowPath = [NSBezierPath bezierPath]; 
    7878 
    79                                         NSPoint                 center = NSMakePoint(cellFrame.origin.x + FLIPPY_WIDTH/2, 
     79                                        NSPoint                 center = NSMakePoint(cellFrame.origin.x + DISCLOSURE_TRIANGLE_WIDTH/2, 
    8080                                                                                                                 cellFrame.origin.y + (cellFrame.size.height/2.0)); 
    8181                                        /* Remember: The view is flipped */ 
    8282                                        if ([self isItemExpanded:item]) { 
    8383                                                //Bottom point 
    8484                                                [arrowPath moveToPoint:NSMakePoint(center.x,  
    85                                                                                                                    center.y + FLIPPY_HEIGHT/2)]; 
     85                                                                                                                   center.y + DISCLOSURE_TRIANGLE_HEIGHT/2)]; 
    8686                                                //Move to top left 
    87                                                 [arrowPath relativeLineToPoint:NSMakePoint(-(FLIPPY_WIDTH/2), -FLIPPY_HEIGHT)]; 
     87                                                [arrowPath relativeLineToPoint:NSMakePoint(-(DISCLOSURE_TRIANGLE_WIDTH/2), -DISCLOSURE_TRIANGLE_HEIGHT)]; 
    8888                                                 
    8989                                                //Move to top right 
    90                                                 [arrowPath relativeLineToPoint:NSMakePoint(FLIPPY_WIDTH, 0)]; 
     90                                                [arrowPath relativeLineToPoint:NSMakePoint(DISCLOSURE_TRIANGLE_WIDTH, 0)]; 
    9191                                        } else { 
    9292                                                //Bottom left 
    93                                                 [arrowPath moveToPoint:NSMakePoint(center.x - (FLIPPY_WIDTH/2),  
    94                                                                                                                    center.y + (FLIPPY_HEIGHT/2))]; 
     93                                                [arrowPath moveToPoint:NSMakePoint(center.x - (DISCLOSURE_TRIANGLE_WIDTH/2),  
     94                                                                                                                   center.y + (DISCLOSURE_TRIANGLE_HEIGHT/2))]; 
    9595                                                //Move to top left 
    96                                                 [arrowPath relativeLineToPoint:NSMakePoint(0, -FLIPPY_HEIGHT)]; 
     96                                                [arrowPath relativeLineToPoint:NSMakePoint(0, -DISCLOSURE_TRIANGLE_HEIGHT)]; 
    9797                                                 
    9898                                                //Move to middle right 
    99                                                 [arrowPath relativeLineToPoint:NSMakePoint(FLIPPY_WIDTH, FLIPPY_HEIGHT/2)]; 
     99                                                [arrowPath relativeLineToPoint:NSMakePoint(DISCLOSURE_TRIANGLE_WIDTH, DISCLOSURE_TRIANGLE_HEIGHT/2)]; 
    100100                                        } 
    101101                                         
    102102                                        [arrowPath closePath]; 
     
    108108                                        } 
    109109                                        [arrowPath fill]; 
    110110                                         
    111                                         cellFrame.origin.x += FLIPPY_WIDTH + FLIPPY_TEXT_PADDING/2; 
    112                                         cellFrame.size.width -= FLIPPY_WIDTH + FLIPPY_TEXT_PADDING/2; 
     111                                        cellFrame.origin.x += DISCLOSURE_TRIANGLE_WIDTH + DISCLOSURE_TRIANGLE_TEXT_PADDING/2; 
     112                                        cellFrame.size.width -= DISCLOSURE_TRIANGLE_WIDTH + DISCLOSURE_TRIANGLE_TEXT_PADDING/2; 
    113113                                } 
    114114                        } 
    115115                         
  • Frameworks/Adium

    old new  
    3131        NSSize          _gradientSize; 
    3232} 
    3333 
    34 - (int)flippyIndent; 
     34- (int)disclosureTriangleIndent; 
    3535- (void)setShowCollapsedCount:(BOOL)inValue; 
    3636- (void)setShadowColor:(NSColor *)inColor; 
    3737- (NSColor *)shadowColor; 
     
    4343- (void)drawBackgroundGradientInRect:(NSRect)inRect; 
    4444- (AIGradient *)backgroundGradient; 
    4545- (void)flushGradientCache; 
    46 - (NSColor *)flippyColor; 
     46- (NSColor *)disclosureTriangleColor; 
    4747         
    4848@end 
  • Frameworks/Adium

    old new  
    2121#import <AIUtilities/AIApplicationAdditions.h> 
    2222#import <AIUtilities/AIParagraphStyleAdditions.h> 
    2323 
    24 #define FLIPPY_TEXT_PADDING           4 
    25 #define GROUP_COUNT_PADDING             
     24#define DISCLOSURE_TRIANGLE_TEXT_PADDING      4 
     25#define GROUP_COUNT_PADDING                                    
    2626 
    2727@implementation AIListGroupCell 
    2828 
     
    120120 
    121121//Sizing & Padding ----------------------------------------------------------------------------------------------------- 
    122122#pragma mark Sizing & Padding 
    123 //Padding.  Gives our cell a bit of extra padding for the group name and flippy triangle 
     123//Padding.  Gives our cell a bit of extra padding for the group name and disclosure triangle 
    124124- (int)topPadding{ 
    125125        return [super topPadding] + 1; 
    126126} 
     
    143143- (int)cellWidth 
    144144{ 
    145145        NSAttributedString      *displayName; 
    146         unsigned                        width = [super cellWidth] + [self flippyIndent] + GROUP_COUNT_PADDING; 
     146        unsigned                        width = [super cellWidth] + [self disclosureTriangleIndent] + GROUP_COUNT_PADDING; 
    147147         
    148148        //Get the size of our display name 
    149149        displayName = [[NSAttributedString alloc] initWithString:[self labelString] attributes:[self labelAttributes]]; 
     
    163163} 
    164164 
    165165//Calculates the distance from left margin to our display name.  This is the indent caused by group nesting. 
    166 - (int)flippyIndent 
     166- (int)disclosureTriangleIndent 
    167167{ 
    168168//      if ([self textAlignment] != NSCenterTextAlignment) { 
    169169                NSSize size = [self cellSize]; 
    170                 return size.height*.4 + size.height*.2 + FLIPPY_TEXT_PADDING; 
     170                return size.height*.4 + size.height*.2 + DISCLOSURE_TRIANGLE_TEXT_PADDING; 
    171171/*      } else { 
    172172                return 0; 
    173173        } 
     
    180180//Draw content of our cell 
    181181- (void)drawContentWithFrame:(NSRect)rect 
    182182{ 
    183         //Draw flippy triangle 
    184         [[self flippyColor] set]; 
     183        //Draw disclosure triangle 
     184        [[self disclosureTriangleColor] set]; 
    185185         
    186186        NSBezierPath    *arrowPath = [NSBezierPath bezierPath]; 
    187187        NSPoint                 center = NSMakePoint(rect.origin.x + rect.size.height*.4, rect.origin.y + (rect.size.height/2.0)); 
     
    200200        [arrowPath fill]; 
    201201 
    202202//      if ([self textAlignment] != NSCenterTextAlignment) { 
    203                 rect.origin.x += rect.size.height*.4 + rect.size.height*.2 + FLIPPY_TEXT_PADDING; 
    204                 rect.size.width -= rect.size.height*.4 + rect.size.height*.2 + FLIPPY_TEXT_PADDING; 
     203                rect.origin.x += rect.size.height*.4 + rect.size.height*.2 + DISCLOSURE_TRIANGLE_TEXT_PADDING; 
     204                rect.size.width -= rect.size.height*.4 + rect.size.height*.2 + DISCLOSURE_TRIANGLE_TEXT_PADDING; 
    205205//      } 
    206206         
    207207        if (([[listObject displayArrayObjectForKey:@"Show Count"] boolValue]) || 
     
    257257        } 
    258258} 
    259259 
    260 //Color of our flippy triangle.  By default we use the cell's text color. 
    261 - (NSColor *)flippyColor 
     260//Color of our disclosure triangle.  By default we use the cell's text color. 
     261- (NSColor *)disclosureTriangleColor 
    262262{ 
    263263        return [self textColor]; 
    264264} 
  • Frameworks/Adium

    old new  
    4040        //Fit the bubble to their name 
    4141        rect.size.width = nameSize.width + [self leftPadding] + [self rightPadding]; 
    4242         
    43         //Until we get right aligned/centered flippies, this will do 
     43        //Until we get right aligned/centered disclosureTriangle, this will do 
    4444        if ([self textAlignment] == NSLeftTextAlignment) { 
    45                 rect.size.width += [self flippyIndent]; 
     45                rect.size.width += [self disclosureTriangleIndent]; 
    4646        } 
    4747         
    4848        //Don't let the bubble try to draw larger than the width we were passed, which was the full width possible