Fix some oopsies
This commit is contained in:
parent
178860e715
commit
4a7afb246d
@ -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;
|
||||
|
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user