fix: clearing of the backgroundColor property on TouchBarButton (#19437)

This commit is contained in:
Milan Burda 2019-07-26 11:52:42 +02:00 committed by Alexey Kuzmin
parent bdd626f57a
commit 44efaea6d5

View file

@ -357,8 +357,11 @@ static NSString* const ImageScrubberItemIdentifier = @"scrubber.image.item";
NSButton* button = (NSButton*)item.view; NSButton* button = (NSButton*)item.view;
std::string backgroundColor; std::string backgroundColor;
if (settings.Get("backgroundColor", &backgroundColor)) { if (settings.Get("backgroundColor", &backgroundColor) &&
!backgroundColor.empty()) {
button.bezelColor = [self colorFromHexColorString:backgroundColor]; button.bezelColor = [self colorFromHexColorString:backgroundColor];
} else {
button.bezelColor = nil;
} }
std::string label; std::string label;