From 44efaea6d51bb587d194a358fa88ccdbab883882 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Fri, 26 Jul 2019 11:52:42 +0200 Subject: [PATCH] fix: clearing of the backgroundColor property on TouchBarButton (#19437) --- shell/browser/ui/cocoa/atom_touch_bar.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/shell/browser/ui/cocoa/atom_touch_bar.mm b/shell/browser/ui/cocoa/atom_touch_bar.mm index 9b17e1612b..4bdb2e464b 100644 --- a/shell/browser/ui/cocoa/atom_touch_bar.mm +++ b/shell/browser/ui/cocoa/atom_touch_bar.mm @@ -357,8 +357,11 @@ static NSString* const ImageScrubberItemIdentifier = @"scrubber.image.item"; NSButton* button = (NSButton*)item.view; std::string backgroundColor; - if (settings.Get("backgroundColor", &backgroundColor)) { + if (settings.Get("backgroundColor", &backgroundColor) && + !backgroundColor.empty()) { button.bezelColor = [self colorFromHexColorString:backgroundColor]; + } else { + button.bezelColor = nil; } std::string label;