diff --git a/macosx/Images/ActionHover.png b/macosx/Images/ActionHover.png index 93f016282..d967ff620 100644 Binary files a/macosx/Images/ActionHover.png and b/macosx/Images/ActionHover.png differ diff --git a/macosx/Images/ActionOff.png b/macosx/Images/ActionOff.png index b70b756f3..8173d9534 100644 Binary files a/macosx/Images/ActionOff.png and b/macosx/Images/ActionOff.png differ diff --git a/macosx/Images/ActionOn.png b/macosx/Images/ActionOn.png index 9ef63a7c3..9074ee12a 100644 Binary files a/macosx/Images/ActionOn.png and b/macosx/Images/ActionOn.png differ diff --git a/macosx/Images/PauseHover.png b/macosx/Images/PauseHover.png index 0f7d967eb..b6b6257c3 100644 Binary files a/macosx/Images/PauseHover.png and b/macosx/Images/PauseHover.png differ diff --git a/macosx/Images/PauseOn.png b/macosx/Images/PauseOn.png index 3b8c3c107..e30130eb2 100644 Binary files a/macosx/Images/PauseOn.png and b/macosx/Images/PauseOn.png differ diff --git a/macosx/Images/ResumeHover.png b/macosx/Images/ResumeHover.png index d7ad19ebe..4d20b69c8 100644 Binary files a/macosx/Images/ResumeHover.png and b/macosx/Images/ResumeHover.png differ diff --git a/macosx/Images/ResumeOn.png b/macosx/Images/ResumeOn.png index a91f34963..f77bd9610 100644 Binary files a/macosx/Images/ResumeOn.png and b/macosx/Images/ResumeOn.png differ diff --git a/macosx/Images/RevealHover.png b/macosx/Images/RevealHover.png index 7ae32a358..b6c42bbc7 100644 Binary files a/macosx/Images/RevealHover.png and b/macosx/Images/RevealHover.png differ diff --git a/macosx/Images/RevealOn.png b/macosx/Images/RevealOn.png index 09814d278..7d00c9e7c 100644 Binary files a/macosx/Images/RevealOn.png and b/macosx/Images/RevealOn.png differ diff --git a/macosx/TorrentCell.m b/macosx/TorrentCell.m index 95f662b62..dccc3649d 100644 --- a/macosx/TorrentCell.m +++ b/macosx/TorrentCell.m @@ -36,16 +36,17 @@ #define IMAGE_SIZE_MIN 16.0 #define NORMAL_BUTTON_WIDTH 14.0 -#define ACTION_BUTTON_HEIGHT 14.0 -#define ACTION_BUTTON_WIDTH 32.0 +/*#define ACTION_BUTTON_HEIGHT 14.0 +#define ACTION_BUTTON_WIDTH 32.0*/ +#define ACTION_BUTTON_WIDTH 16.0 //ends up being larger than font height #define HEIGHT_TITLE 16.0 #define HEIGHT_STATUS 12.0 -#define PADDING_HORIZONTAL 2.0 -#define PADDING_ABOVE_IMAGE_REG 9.0 -#define PADDING_BETWEEN_IMAGE_AND_ACTION_BUTTON 3.0 +#define PADDING_HORIZONTAL 3.0 +//#define PADDING_ABOVE_IMAGE_REG 9.0 +//#define PADDING_BETWEEN_IMAGE_AND_ACTION_BUTTON 3.0 #define PADDING_BETWEEN_IMAGE_AND_TITLE 5.0 #define PADDING_BETWEEN_IMAGE_AND_BAR 7.0 #define PADDING_ABOVE_TITLE 3.0 @@ -158,9 +159,13 @@ { NSRect result = bounds; - result.origin.x += PADDING_HORIZONTAL; + float imageSize = [fDefaults boolForKey: @"SmallView"] ? IMAGE_SIZE_MIN : IMAGE_SIZE_REG; - float imageSize; + result.origin.x += PADDING_HORIZONTAL; + result.origin.y += floorf((result.size.height - imageSize) * 0.5); + result.size = NSMakeSize(imageSize, imageSize); + + /*float imageSize; if ([fDefaults boolForKey: @"SmallView"]) { imageSize = IMAGE_SIZE_MIN; @@ -170,9 +175,7 @@ { imageSize = IMAGE_SIZE_REG; result.origin.y += PADDING_ABOVE_IMAGE_REG; - } - - result.size = NSMakeSize(imageSize, imageSize); + }*/ return result; } @@ -201,7 +204,7 @@ NSRect result = bounds; result.size.height = BAR_HEIGHT; - result.origin.x = PADDING_HORIZONTAL + (minimal ? IMAGE_SIZE_MIN : IMAGE_SIZE_REG) + PADDING_BETWEEN_IMAGE_AND_BAR; + result.origin.x = (minimal ? IMAGE_SIZE_MIN : IMAGE_SIZE_REG) + PADDING_BETWEEN_IMAGE_AND_BAR; result.origin.y += PADDING_ABOVE_TITLE + HEIGHT_TITLE; if (minimal) @@ -257,11 +260,17 @@ if ([fDefaults boolForKey: @"SmallView"]) return iconRect; - NSRect result = iconRect; + /*NSRect result = iconRect; result.origin.x += (iconRect.size.width - ACTION_BUTTON_WIDTH) * 0.5; result.origin.y += iconRect.size.height + PADDING_BETWEEN_IMAGE_AND_ACTION_BUTTON; result.size.width = ACTION_BUTTON_WIDTH; - result.size.height = ACTION_BUTTON_HEIGHT; + result.size.height = ACTION_BUTTON_HEIGHT;*/ + NSRect result = iconRect; + result.origin.x += (iconRect.size.width - ACTION_BUTTON_WIDTH) * 0.5; + result.origin.y += (iconRect.size.height - ACTION_BUTTON_WIDTH) * 0.5; + result.size.width = ACTION_BUTTON_WIDTH; + result.size.height = ACTION_BUTTON_WIDTH; + return result; } @@ -549,14 +558,15 @@ fraction: 1.0]; //action button - if (!minimal) + NSString * actionImageSuffix; + if (!fTracking && fHoverAction) + actionImageSuffix = @"Hover.png"; + else + //actionImageSuffix = @"Off.png"; + actionImageSuffix = nil; + + if (actionImageSuffix) { - NSString * actionImageSuffix; - if (!fTracking && fHoverAction) - actionImageSuffix = @"Hover.png"; - else - actionImageSuffix = @"Off.png"; - NSImage * actionImage = [NSImage imageNamed: [@"Action" stringByAppendingString: actionImageSuffix]]; [actionImage setFlipped: YES]; [actionImage drawInRect: [self actionButtonRectForBounds: cellFrame] fromRect: NSZeroRect operation: NSCompositeSourceOver