-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bad looking icons on Mavericks.
Oddly enough I had to manually set the size of all icons before assigning them to their respective menu items and status bar item, otherwise the icons look all messed up on Mavericks. This was not needed in order to work on Mountain Lion though.
- Loading branch information
Showing
7 changed files
with
183 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// ImageFactory.h | ||
// Tomighty | ||
// | ||
// Created by Célio Cidral Jr on 05/11/13. | ||
// Copyright (c) 2013 Célio Cidral Jr. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface ImageLoader : NSObject | ||
|
||
+ (NSImage*) loadIcon:(NSString*)name; | ||
+ (NSImage*) loadTiffImage:(NSString*)name withSize:(int)size; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// ImageFactory.m | ||
// Tomighty | ||
// | ||
// Created by Célio Cidral Jr on 05/11/13. | ||
// Copyright (c) 2013 Célio Cidral Jr. All rights reserved. | ||
// | ||
|
||
#import "ImageLoader.h" | ||
|
||
@implementation ImageLoader | ||
|
||
int const ICON_SIZE = 16; | ||
|
||
+ (NSImage*) loadIcon:(NSString*)name { | ||
return [self loadTiffImage:name withSize:ICON_SIZE]; | ||
} | ||
|
||
+ (NSImage*) loadTiffImage:(NSString*)name withSize:(int)widthAndHeight { | ||
NSString* fileName = [NSString stringWithFormat:@"%@.tiff", name]; | ||
NSImage* image = [NSImage imageNamed:fileName]; | ||
|
||
NSSize size; | ||
size.width = widthAndHeight; | ||
size.height = widthAndHeight; | ||
|
||
[image setSize:size]; | ||
|
||
return image; | ||
} | ||
|
||
@end |
Oops, something went wrong.