Skip to content

Commit

Permalink
Refactoring colorFromHex --> colorFromHexString
Browse files Browse the repository at this point in the history
  • Loading branch information
sveinbjornt committed Feb 26, 2017
1 parent a3dff9e commit 5385113
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Application/PlatypusWindowController.m
Expand Up @@ -625,8 +625,8 @@ - (void)controlsFromAppSpec:(PlatypusAppSpec *)spec {

// text settings
[textSettingsController setTextFont:[NSFont fontWithName:spec[AppSpecKey_TextFont] size:[spec[AppSpecKey_TextSize] intValue]]];
[textSettingsController setTextForegroundColor:[NSColor colorFromHex:spec[AppSpecKey_TextColor]]];
[textSettingsController setTextBackgroundColor:[NSColor colorFromHex:spec[AppSpecKey_TextBackgroundColor]]];
[textSettingsController setTextForegroundColor:[NSColor colorFromHexString:spec[AppSpecKey_TextColor]]];
[textSettingsController setTextBackgroundColor:[NSColor colorFromHexString:spec[AppSpecKey_TextBackgroundColor]]];

// status menu settings
if (InterfaceTypeForString(spec[AppSpecKey_InterfaceType]) == PlatypusInterfaceType_StatusMenu) {
Expand Down
8 changes: 4 additions & 4 deletions ScriptExec/ScriptExecController.m
Expand Up @@ -251,18 +251,18 @@ - (void)loadAppSettings {

// foreground color
if (appSettingsDict[AppSpecKey_TextColor] != nil) {
textForegroundColor = [NSColor colorFromHex:appSettingsDict[AppSpecKey_TextColor]];
textForegroundColor = [NSColor colorFromHexString:appSettingsDict[AppSpecKey_TextColor]];
}
if (textForegroundColor == nil) {
textForegroundColor = [NSColor colorFromHex:DEFAULT_TEXT_FG_COLOR];
textForegroundColor = [NSColor colorFromHexString:DEFAULT_TEXT_FG_COLOR];
}

// background color
if (appSettingsDict[AppSpecKey_TextBackgroundColor] != nil) {
textBackgroundColor = [NSColor colorFromHex:appSettingsDict[AppSpecKey_TextBackgroundColor]];
textBackgroundColor = [NSColor colorFromHexString:appSettingsDict[AppSpecKey_TextBackgroundColor]];
}
if (textBackgroundColor == nil) {
textBackgroundColor = [NSColor colorFromHex:DEFAULT_TEXT_BG_COLOR];
textBackgroundColor = [NSColor colorFromHexString:DEFAULT_TEXT_BG_COLOR];
}
}

Expand Down

0 comments on commit 5385113

Please sign in to comment.