Skip to content

Commit

Permalink
fixed status icon messing up on changing appearance
Browse files Browse the repository at this point in the history
Closes #7
  • Loading branch information
artginzburg committed Feb 11, 2020
1 parent c5b672b commit 5931de8
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 4 deletions.
19 changes: 18 additions & 1 deletion MiddleClick.xcodeproj/project.pbxproj
Expand Up @@ -155,7 +155,12 @@
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1020;
LastUpgradeCheck = 1130;
TargetAttributes = {
8D1107260486CEB800E47090 = {
ProvisioningStyle = Automatic;
};
};
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "MiddleClick" */;
compatibilityVersion = "Xcode 3.2";
Expand Down Expand Up @@ -205,8 +210,12 @@
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 12022020;
DEVELOPMENT_TEAM = "";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
Expand All @@ -217,8 +226,10 @@
GCC_PRECOMPILE_PREFIX_HEADER = NO;
INFOPLIST_FILE = "$(SRCROOT)/MiddleClick/Info.plist";
INSTALL_PATH = "$(HOME)/Applications";
MARKETING_VERSION = 2.4.6;
PRODUCT_BUNDLE_IDENTIFIER = com.rouge41.middleClick;
PRODUCT_NAME = MiddleClick;
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = macosx;
};
name = Debug;
Expand All @@ -229,8 +240,12 @@
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 12022020;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = "";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
Expand All @@ -239,8 +254,10 @@
GCC_PRECOMPILE_PREFIX_HEADER = NO;
INFOPLIST_FILE = "$(SRCROOT)/MiddleClick/Info.plist";
INSTALL_PATH = "$(HOME)/Applications";
MARKETING_VERSION = 2.4.6;
PRODUCT_BUNDLE_IDENTIFIER = com.rouge41.middleClick;
PRODUCT_NAME = MiddleClick;
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = macosx;
};
name = Release;
Expand Down
1 change: 1 addition & 0 deletions MiddleClick/Controller.m
Expand Up @@ -293,6 +293,7 @@ static void restartApp()
[task setLaunchPath:@"/bin/sh"];
[task setArguments:args];
[task launch];
NSLog(@"Restarting app...");

[NSApp terminate:NULL];
}
Expand Down
23 changes: 23 additions & 0 deletions MiddleClick/Images.xcassets/StatusIcon.imageset/Contents.json
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "mouse32x32.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "mouse-1.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "mouse128x128.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions MiddleClick/Info.plist
Expand Up @@ -15,9 +15,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.4.5</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>29082019</string>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.productivity</string>
<key>LSMinimumSystemVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion MiddleClick/TrayMenu.m
Expand Up @@ -92,7 +92,7 @@ - (void)applicationDidFinishLaunching:(NSNotification*)notification
{
NSMenu* menu = [self createMenu];

NSImage* icon = [NSApp applicationIconImage];
NSImage* icon = [NSImage imageNamed:(@"StatusIcon")];
[icon setSize:CGSizeMake(24, 24)];

// Check if Darkmode menubar is supported and enable templating of the icon in
Expand Down

0 comments on commit 5931de8

Please sign in to comment.