diff --git a/Cocoa/GBHueSliderCell.m b/Cocoa/GBHueSliderCell.m index 7f0bd82..11fdc09 100644 --- a/Cocoa/GBHueSliderCell.m +++ b/Cocoa/GBHueSliderCell.m @@ -48,7 +48,7 @@ [super drawKnob:knobRect]; NSRect peekRect = knobRect; peekRect.size.width /= 2; - peekRect.size.height /= 2; + peekRect.size.height = peekRect.size.width; peekRect.origin.x += peekRect.size.width / 2; peekRect.origin.y += peekRect.size.height / 2; NSColor *color = self.colorValue; diff --git a/Cocoa/GBPaletteEditorController.m b/Cocoa/GBPaletteEditorController.m index 5df4aef..0a613fb 100644 --- a/Cocoa/GBPaletteEditorController.m +++ b/Cocoa/GBPaletteEditorController.m @@ -148,7 +148,7 @@ static double blend(double from, double to, double position) return; } NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; - NSMutableDictionary *themes = [[defaults dictionaryForKey:@"GBThemes"] ?: @[] mutableCopy]; + NSMutableDictionary *themes = [[defaults dictionaryForKey:@"GBThemes"] ?: @{} mutableCopy]; NSString *newName = object; unsigned i = 2; if (!newName.length) { @@ -171,7 +171,7 @@ static double blend(double from, double to, double position) { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSString *name = [defaults stringForKey:@"GBCurrentTheme"]; - NSMutableDictionary *themes = [[defaults dictionaryForKey:@"GBThemes"] ?: @[] mutableCopy]; + NSMutableDictionary *themes = [[defaults dictionaryForKey:@"GBThemes"] ?: @{} mutableCopy]; [themes removeObjectForKey:name]; [defaults setObject:themes forKey:@"GBThemes"]; [_themesList reloadData]; @@ -267,7 +267,7 @@ static double blend(double from, double to, double position) @"HueBiasStrength": @(_hueStrengthSlider.doubleValue / 256.0) }; NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; - NSMutableDictionary *themes = [[defaults dictionaryForKey:@"GBThemes"] ?: @[] mutableCopy]; + NSMutableDictionary *themes = [[defaults dictionaryForKey:@"GBThemes"] ?: @{} mutableCopy]; themes[[defaults stringForKey:@"GBCurrentTheme"]] = theme; [defaults setObject:themes forKey:@"GBThemes"]; [[NSNotificationCenter defaultCenter] postNotificationName:@"GBColorPaletteChanged" object:nil];