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 8 8 9 9 #import "AIVariableHeightFlexibleColumnsOutlineView.h" 10 10 11 #define FLIPPY_WIDTH1012 #define FLIPPY_HEIGHT1013 #define FLIPPY_TEXT_PADDING211 #define DISCLOSURE_TRIANGLE_WIDTH 10 12 #define DISCLOSURE_TRIANGLE_HEIGHT 10 13 #define DISCLOSURE_TRIANGLE_TEXT_PADDING 2 14 14 15 15 /* 16 16 * @class AIVariableHeightFlexibleColumnsOutlineView … … 68 68 69 69 70 70 if (tableColumnIndex == 0) { 71 //Draw flippytriangle71 //Draw disclosure triangle 72 72 if ([self isExpandable:item]) { 73 73 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; 76 76 77 77 NSBezierPath *arrowPath = [NSBezierPath bezierPath]; 78 78 79 NSPoint center = NSMakePoint(cellFrame.origin.x + FLIPPY_WIDTH/2,79 NSPoint center = NSMakePoint(cellFrame.origin.x + DISCLOSURE_TRIANGLE_WIDTH/2, 80 80 cellFrame.origin.y + (cellFrame.size.height/2.0)); 81 81 /* Remember: The view is flipped */ 82 82 if ([self isItemExpanded:item]) { 83 83 //Bottom point 84 84 [arrowPath moveToPoint:NSMakePoint(center.x, 85 center.y + FLIPPY_HEIGHT/2)];85 center.y + DISCLOSURE_TRIANGLE_HEIGHT/2)]; 86 86 //Move to top left 87 [arrowPath relativeLineToPoint:NSMakePoint(-( FLIPPY_WIDTH/2), -FLIPPY_HEIGHT)];87 [arrowPath relativeLineToPoint:NSMakePoint(-(DISCLOSURE_TRIANGLE_WIDTH/2), -DISCLOSURE_TRIANGLE_HEIGHT)]; 88 88 89 89 //Move to top right 90 [arrowPath relativeLineToPoint:NSMakePoint( FLIPPY_WIDTH, 0)];90 [arrowPath relativeLineToPoint:NSMakePoint(DISCLOSURE_TRIANGLE_WIDTH, 0)]; 91 91 } else { 92 92 //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))]; 95 95 //Move to top left 96 [arrowPath relativeLineToPoint:NSMakePoint(0, - FLIPPY_HEIGHT)];96 [arrowPath relativeLineToPoint:NSMakePoint(0, -DISCLOSURE_TRIANGLE_HEIGHT)]; 97 97 98 98 //Move to middle right 99 [arrowPath relativeLineToPoint:NSMakePoint( FLIPPY_WIDTH, FLIPPY_HEIGHT/2)];99 [arrowPath relativeLineToPoint:NSMakePoint(DISCLOSURE_TRIANGLE_WIDTH, DISCLOSURE_TRIANGLE_HEIGHT/2)]; 100 100 } 101 101 102 102 [arrowPath closePath]; … … 108 108 } 109 109 [arrowPath fill]; 110 110 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; 113 113 } 114 114 } 115 115 -
Frameworks/Adium
old new 31 31 NSSize _gradientSize; 32 32 } 33 33 34 - (int) flippyIndent;34 - (int)disclosureTriangleIndent; 35 35 - (void)setShowCollapsedCount:(BOOL)inValue; 36 36 - (void)setShadowColor:(NSColor *)inColor; 37 37 - (NSColor *)shadowColor; … … 43 43 - (void)drawBackgroundGradientInRect:(NSRect)inRect; 44 44 - (AIGradient *)backgroundGradient; 45 45 - (void)flushGradientCache; 46 - (NSColor *) flippyColor;46 - (NSColor *)disclosureTriangleColor; 47 47 48 48 @end -
Frameworks/Adium
old new 21 21 #import <AIUtilities/AIApplicationAdditions.h> 22 22 #import <AIUtilities/AIParagraphStyleAdditions.h> 23 23 24 #define FLIPPY_TEXT_PADDING425 #define GROUP_COUNT_PADDING 424 #define DISCLOSURE_TRIANGLE_TEXT_PADDING 4 25 #define GROUP_COUNT_PADDING 4 26 26 27 27 @implementation AIListGroupCell 28 28 … … 120 120 121 121 //Sizing & Padding ----------------------------------------------------------------------------------------------------- 122 122 #pragma mark Sizing & Padding 123 //Padding. Gives our cell a bit of extra padding for the group name and flippytriangle123 //Padding. Gives our cell a bit of extra padding for the group name and disclosure triangle 124 124 - (int)topPadding{ 125 125 return [super topPadding] + 1; 126 126 } … … 143 143 - (int)cellWidth 144 144 { 145 145 NSAttributedString *displayName; 146 unsigned width = [super cellWidth] + [self flippyIndent] + GROUP_COUNT_PADDING;146 unsigned width = [super cellWidth] + [self disclosureTriangleIndent] + GROUP_COUNT_PADDING; 147 147 148 148 //Get the size of our display name 149 149 displayName = [[NSAttributedString alloc] initWithString:[self labelString] attributes:[self labelAttributes]]; … … 163 163 } 164 164 165 165 //Calculates the distance from left margin to our display name. This is the indent caused by group nesting. 166 - (int) flippyIndent166 - (int)disclosureTriangleIndent 167 167 { 168 168 // if ([self textAlignment] != NSCenterTextAlignment) { 169 169 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; 171 171 /* } else { 172 172 return 0; 173 173 } … … 180 180 //Draw content of our cell 181 181 - (void)drawContentWithFrame:(NSRect)rect 182 182 { 183 //Draw flippytriangle184 [[self flippyColor] set];183 //Draw disclosure triangle 184 [[self disclosureTriangleColor] set]; 185 185 186 186 NSBezierPath *arrowPath = [NSBezierPath bezierPath]; 187 187 NSPoint center = NSMakePoint(rect.origin.x + rect.size.height*.4, rect.origin.y + (rect.size.height/2.0)); … … 200 200 [arrowPath fill]; 201 201 202 202 // 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; 205 205 // } 206 206 207 207 if (([[listObject displayArrayObjectForKey:@"Show Count"] boolValue]) || … … 257 257 } 258 258 } 259 259 260 //Color of our flippytriangle. By default we use the cell's text color.261 - (NSColor *) flippyColor260 //Color of our disclosure triangle. By default we use the cell's text color. 261 - (NSColor *)disclosureTriangleColor 262 262 { 263 263 return [self textColor]; 264 264 } -
Frameworks/Adium
old new 40 40 //Fit the bubble to their name 41 41 rect.size.width = nameSize.width + [self leftPadding] + [self rightPadding]; 42 42 43 //Until we get right aligned/centered flippies, this will do43 //Until we get right aligned/centered disclosureTriangle, this will do 44 44 if ([self textAlignment] == NSLeftTextAlignment) { 45 rect.size.width += [self flippyIndent];45 rect.size.width += [self disclosureTriangleIndent]; 46 46 } 47 47 48 48 //Don't let the bubble try to draw larger than the width we were passed, which was the full width possible