mirror of
https://github.com/transmission/transmission
synced 2024-12-23 00:04:06 +00:00
miscellaneous adjustments
This commit is contained in:
parent
06743cb430
commit
963d736dce
5 changed files with 11 additions and 24 deletions
|
@ -132,8 +132,9 @@
|
|||
//string is in center of image
|
||||
rect.origin.x += (rect.size.width - stringSize.width) * 0.5;
|
||||
rect.origin.y += (rect.size.height - stringSize.height) * 0.5;
|
||||
rect.size = stringSize;
|
||||
|
||||
[string drawAtPoint: rect.origin withAttributes: fAttributes];
|
||||
[string drawInRect: rect withAttributes: fAttributes];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -261,8 +261,9 @@
|
|||
//string is in center of image
|
||||
rect.origin.x += (rect.size.width - stringSize.width) * 0.5;
|
||||
rect.origin.y += (rect.size.height - stringSize.height) * 0.5;
|
||||
rect.size = stringSize;
|
||||
|
||||
[string drawAtPoint: rect.origin withAttributes: fAttributes];
|
||||
[string drawInRect: rect withAttributes: fAttributes];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -91,9 +91,9 @@
|
|||
fBadge = [fBackBadge copy];
|
||||
NSSize badgeSize = [fBadge size];
|
||||
|
||||
//place icon
|
||||
[fBadge lockFocus];
|
||||
const float WIDTH = 64.0;
|
||||
|
||||
//place icon
|
||||
[icon drawInRect: NSMakeRect(PADDING, (badgeSize.height - ICON_WIDTH) * 0.5, ICON_WIDTH, ICON_WIDTH) fromRect: NSZeroRect
|
||||
operation: NSCompositeSourceOver fraction: 1.0];
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
|
||||
@interface FilePriorityCell : NSSegmentedCell
|
||||
{
|
||||
NSImage * fLowImage, * fHighImage, * fNormalImage, * fMixedImage, * fNoneImage;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -92,35 +92,21 @@
|
|||
{
|
||||
NSImage * image;
|
||||
if (count == 0)
|
||||
{
|
||||
if (!fNoneImage)
|
||||
fNoneImage = [NSImage imageNamed: @"PriorityNone.png"];
|
||||
image = fNoneImage;
|
||||
}
|
||||
image = [NSImage imageNamed: @"PriorityNone.png"];
|
||||
else if (count > 1)
|
||||
{
|
||||
if (!fMixedImage)
|
||||
fMixedImage = [NSImage imageNamed: @"PriorityMixed.png"];
|
||||
image = fMixedImage;
|
||||
}
|
||||
image = [NSImage imageNamed: @"PriorityMixed.png"];
|
||||
else
|
||||
{
|
||||
switch ([[priorities anyObject] intValue])
|
||||
{
|
||||
case TR_PRI_NORMAL:
|
||||
if (!fNormalImage)
|
||||
fNormalImage = [NSImage imageNamed: @"PriorityNormal.png"];
|
||||
image = fNormalImage;
|
||||
image = [NSImage imageNamed: @"PriorityNormal.png"];
|
||||
break;
|
||||
case TR_PRI_LOW:
|
||||
if (!fLowImage)
|
||||
fLowImage = [NSImage imageNamed: @"PriorityLow.png"];
|
||||
image = fLowImage;
|
||||
image = [NSImage imageNamed: @"PriorityLow.png"];
|
||||
break;
|
||||
case TR_PRI_HIGH:
|
||||
if (!fHighImage)
|
||||
fHighImage = [NSImage imageNamed: @"PriorityHigh.png"];
|
||||
image = fHighImage;
|
||||
image = [NSImage imageNamed: @"PriorityHigh.png"];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue