Make iconPosition non-breaking by defaulting to overlay

This commit is contained in:
Samuel Attard 2017-04-17 12:30:55 +12:00 committed by Kevin Sawicki
parent 11c7c107a9
commit 526d287d25

View file

@ -307,17 +307,17 @@ static NSString* const ImageScrubberItemIdentifier = @"scrubber.image.item";
settings.Get("label", &label);
button.title = base::SysUTF8ToNSString(label);
std::string iconPosition = "left";
std::string iconPosition = "overlay";
settings.Get("iconPosition", &iconPosition);
gfx::Image image;
if (settings.Get("icon", &image)) {
button.image = image.AsNSImage();
if (iconPosition == "overlay") {
button.imagePosition = NSImageOverlaps;
if (iconPosition == "left") {
button.imagePosition = NSImageLeft;
} else if (iconPosition == "right") {
button.imagePosition = NSImageRight;
} else {
button.imagePosition = NSImageLeft;
button.imagePosition = NSImageOverlaps;
}
}
}