Use NSZeroRect for scrubber frame

This commit is contained in:
Kevin Sawicki 2017-03-15 09:45:46 -07:00
parent 466c39ed19
commit f41db87e47

View file

@ -503,11 +503,7 @@ static NSString* const ImageScrubberItemIdentifier = @"scrubber.image.item";
base::scoped_nsobject<NSCustomTouchBarItem> item([[NSClassFromString( base::scoped_nsobject<NSCustomTouchBarItem> item([[NSClassFromString(
@"NSCustomTouchBarItem") alloc] initWithIdentifier:identifier]); @"NSCustomTouchBarItem") alloc] initWithIdentifier:identifier]);
int width = 320; NSScrubber* scrubber = [[[NSClassFromString(@"NSScrubber") alloc] initWithFrame:NSZeroRect] autorelease];
int height = 30;
settings.Get("frameWidth", &width);
settings.Get("frameHeight", &height);
NSScrubber* scrubber = [[[NSClassFromString(@"NSScrubber") alloc] initWithFrame:NSMakeRect(0, 0, width, height)] autorelease];
[scrubber registerClass:NSClassFromString(@"NSScrubberTextItemView") forItemIdentifier:TextScrubberItemIdentifier]; [scrubber registerClass:NSClassFromString(@"NSScrubberTextItemView") forItemIdentifier:TextScrubberItemIdentifier];
[scrubber registerClass:NSClassFromString(@"NSScrubberImageItemView") forItemIdentifier:ImageScrubberItemIdentifier]; [scrubber registerClass:NSClassFromString(@"NSScrubberImageItemView") forItemIdentifier:ImageScrubberItemIdentifier];