App-Icon hinzugefügt.

This commit is contained in:
2013-10-31 14:44:16 +01:00
parent 3feb29da29
commit 7948e1afc9
28 changed files with 124 additions and 9 deletions
@@ -9,6 +9,8 @@
/* Begin PBXBuildFile section */
ECB32E3718210D1D00D3C886 /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = ECB32E3618210D1D00D3C886 /* Reachability.m */; };
ECB32E3918210F3A00D3C886 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ECB32E3818210F3A00D3C886 /* SystemConfiguration.framework */; };
ECB963CC18228F42006F370E /* statusbar-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = ECB963CB18228F42006F370E /* statusbar-icon.png */; };
ECB963D01822943E006F370E /* ImageHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = ECB963CF1822943E006F370E /* ImageHelper.m */; };
ECE5811B181A77090066D073 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ECE5811A181A77090066D073 /* Cocoa.framework */; };
ECE58125181A77090066D073 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = ECE58123181A77090066D073 /* InfoPlist.strings */; };
ECE58127181A77090066D073 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = ECE58126181A77090066D073 /* main.m */; };
@@ -38,6 +40,9 @@
ECB32E3518210D1D00D3C886 /* Reachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Reachability.h; sourceTree = "<group>"; };
ECB32E3618210D1D00D3C886 /* Reachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Reachability.m; sourceTree = "<group>"; };
ECB32E3818210F3A00D3C886 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
ECB963CB18228F42006F370E /* statusbar-icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "statusbar-icon.png"; sourceTree = "<group>"; };
ECB963CE1822943E006F370E /* ImageHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageHelper.h; sourceTree = "<group>"; };
ECB963CF1822943E006F370E /* ImageHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageHelper.m; sourceTree = "<group>"; };
ECE58117181A77090066D073 /* ipbc-Client.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ipbc-Client.app"; sourceTree = BUILT_PRODUCTS_DIR; };
ECE5811A181A77090066D073 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
ECE5811D181A77090066D073 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
@@ -85,6 +90,23 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
ECB963CA18228F29006F370E /* images */ = {
isa = PBXGroup;
children = (
ECB963CB18228F42006F370E /* statusbar-icon.png */,
);
name = images;
sourceTree = "<group>";
};
ECB963CD18229423006F370E /* Helper */ = {
isa = PBXGroup;
children = (
ECB963CE1822943E006F370E /* ImageHelper.h */,
ECB963CF1822943E006F370E /* ImageHelper.m */,
);
name = Helper;
sourceTree = "<group>";
};
ECE5810E181A77090066D073 = {
isa = PBXGroup;
children = (
@@ -128,6 +150,8 @@
ECE58120181A77090066D073 /* ipbc-Client */ = {
isa = PBXGroup;
children = (
ECB963CD18229423006F370E /* Helper */,
ECB963CA18228F29006F370E /* images */,
ECE6FED7181E8B1C004F6C1F /* WebService */,
ECE5812C181A77090066D073 /* ipbcAppDelegate.h */,
ECE5812D181A77090066D073 /* ipbcAppDelegate.m */,
@@ -263,6 +287,7 @@
files = (
ECE58125181A77090066D073 /* InfoPlist.strings in Resources */,
ECE58133181A77090066D073 /* Images.xcassets in Resources */,
ECB963CC18228F42006F370E /* statusbar-icon.png in Resources */,
ECE5812B181A77090066D073 /* Credits.rtf in Resources */,
ECE58131181A77090066D073 /* MainMenu.xib in Resources */,
);
@@ -286,6 +311,7 @@
ECE6FEDA181E8BE4004F6C1F /* WebServiceConstants.m in Sources */,
ECE5812E181A77090066D073 /* ipbcAppDelegate.m in Sources */,
ECE58127181A77090066D073 /* main.m in Sources */,
ECB963D01822943E006F370E /* ImageHelper.m in Sources */,
ECE6FED6181E8AFE004F6C1F /* WebserviceClient.m in Sources */,
ECB32E3718210D1D00D3C886 /* Reachability.m in Sources */,
);
+15
View File
@@ -0,0 +1,15 @@
//
// ImageHelper.h
// ipbc-Client
//
// Created by Gerrit Linnemann on 31.10.13.
// Copyright (c) 2013 Adawim UG (haftungsbeschränkt). All rights reserved.
//
#import <Foundation/Foundation.h>
@interface ImageHelper : NSObject
+(NSImage*)resizeImage:(NSImage*)sourceImage size:(NSSize)size;
@end
+30
View File
@@ -0,0 +1,30 @@
//
// ImageHelper.m
// ipbc-Client
//
// Created by Gerrit Linnemann on 31.10.13.
// Copyright (c) 2013 Adawim UG (haftungsbeschränkt). All rights reserved.
//
#import "ImageHelper.h"
@implementation ImageHelper
+(NSImage*)resizeImage:(NSImage*)sourceImage size:(NSSize)size {
NSRect targetFrame = NSMakeRect(0, 0, size.width, size.height);
NSImage* targetImage = nil;
NSImageRep *sourceImageRep =
[sourceImage bestRepresentationForRect:targetFrame
context:nil
hints:nil];
targetImage = [[NSImage alloc] initWithSize:size];
[targetImage lockFocus];
[sourceImageRep drawInRect: targetFrame];
[targetImage unlockFocus];
return targetImage;
}
@end
@@ -1,13 +1,15 @@
{
"images" : [
{
"idiom" : "mac",
"size" : "16x16",
"idiom" : "mac",
"filename" : "icon_16x16.png",
"scale" : "1x"
},
{
"idiom" : "mac",
"size" : "16x16",
"idiom" : "mac",
"filename" : "icon_16x16@2x.png",
"scale" : "2x"
},
{
@@ -16,28 +18,33 @@
"scale" : "1x"
},
{
"idiom" : "mac",
"size" : "32x32",
"idiom" : "mac",
"filename" : "icon_32x32@2x.png",
"scale" : "2x"
},
{
"idiom" : "mac",
"size" : "128x128",
"idiom" : "mac",
"filename" : "icon_128x128.png",
"scale" : "1x"
},
{
"idiom" : "mac",
"size" : "128x128",
"idiom" : "mac",
"filename" : "icon_128x128@2x.png",
"scale" : "2x"
},
{
"idiom" : "mac",
"size" : "256x256",
"idiom" : "mac",
"filename" : "icon_256x256.png",
"scale" : "1x"
},
{
"idiom" : "mac",
"size" : "256x256",
"idiom" : "mac",
"filename" : "icon_256x256@2x.png",
"scale" : "2x"
},
{
@@ -46,8 +53,9 @@
"scale" : "1x"
},
{
"idiom" : "mac",
"size" : "512x512",
"idiom" : "mac",
"filename" : "icon_512x512@2x.png",
"scale" : "2x"
}
],
Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 377 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

+7 -1
View File
@@ -7,6 +7,7 @@
//
#import "ipbcAppDelegate.h"
#import "ImageHelper.h"
@implementation ipbcAppDelegate
@@ -23,8 +24,13 @@
-(void)awakeFromNib {
statusItem = [[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength];
[statusItem setMenu:statusMenu];
[statusItem setTitle:@"ip-bc"];
[statusItem setHighlightMode:YES];
// statusbar icon
NSSize statusbarIconSize;
statusbarIconSize.width = 18;
statusbarIconSize.height = 18;
[statusItem setImage:[ImageHelper resizeImage:[NSImage imageNamed: @"statusbar-icon.png"] size:statusbarIconSize]];
}
-(IBAction)fromMenuSettings:(id)sender {
Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB