Make iconPosition non-breaking by defaulting to overlay
This commit is contained in:
parent
11c7c107a9
commit
526d287d25
1 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue