in compact view, when showing the controls on hover don't resize the title if the replaced text was longer than the width of the buttons
This commit is contained in:
parent
ab7e05ec76
commit
b6aa2c6e2e
|
@ -396,13 +396,16 @@
|
||||||
[fStatusAttributes setObject: statusColor forKey: NSForegroundColorAttributeName];
|
[fStatusAttributes setObject: statusColor forKey: NSForegroundColorAttributeName];
|
||||||
|
|
||||||
//minimal status
|
//minimal status
|
||||||
NSRect minimalStatusRect;
|
CGFloat minimalTitleRightBound;
|
||||||
if (minimal && !fHover)
|
if (minimal)
|
||||||
{
|
{
|
||||||
NSAttributedString * minimalString = [self attributedStatusString: [self minimalStatusString]];
|
NSAttributedString * minimalString = [self attributedStatusString: [self minimalStatusString]];
|
||||||
minimalStatusRect = [self rectForMinimalStatusWithString: minimalString inBounds: cellFrame];
|
NSRect minimalStatusRect = [self rectForMinimalStatusWithString: minimalString inBounds: cellFrame];
|
||||||
|
|
||||||
[minimalString drawInRect: minimalStatusRect];
|
if (!fHover)
|
||||||
|
[minimalString drawInRect: minimalStatusRect];
|
||||||
|
|
||||||
|
minimalTitleRightBound = NSMinX(minimalStatusRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
//progress
|
//progress
|
||||||
|
@ -440,7 +443,7 @@
|
||||||
|
|
||||||
const NSRect controlRect = [self controlButtonRectForBounds: cellFrame];
|
const NSRect controlRect = [self controlButtonRectForBounds: cellFrame];
|
||||||
[self drawImage: controlImage inRect: controlRect];
|
[self drawImage: controlImage inRect: controlRect];
|
||||||
minimalStatusRect = controlRect; //used for limiting title width
|
minimalTitleRightBound = MIN(minimalTitleRightBound, NSMinX(controlRect));
|
||||||
|
|
||||||
//reveal button
|
//reveal button
|
||||||
NSString * revealImageString;
|
NSString * revealImageString;
|
||||||
|
@ -472,7 +475,7 @@
|
||||||
|
|
||||||
//title
|
//title
|
||||||
NSAttributedString * titleString = [self attributedTitle];
|
NSAttributedString * titleString = [self attributedTitle];
|
||||||
NSRect titleRect = [self rectForTitleWithString: titleString withRightBound: NSMinX(minimalStatusRect) inBounds: cellFrame];
|
NSRect titleRect = [self rectForTitleWithString: titleString withRightBound: minimalTitleRightBound inBounds: cellFrame];
|
||||||
[titleString drawInRect: titleRect];
|
[titleString drawInRect: titleRect];
|
||||||
|
|
||||||
//priority icon
|
//priority icon
|
||||||
|
|
Loading…
Reference in New Issue