- (void)updatePopover:(NSPopoverTouchBarItem*)item
withSettings:(const mate::PersistentDictionary&)settings {
std::string label;
- gfx::Image image;
if (settings.Get("label", &label)) {
item.collapsedRepresentationLabel = base::SysUTF8ToNSString(label);
- } else if (settings.Get("image", &image)) {
+ }
+ gfx::Image image;
+ if (settings.Get("icon", &image)) {
item.collapsedRepresentationImage = image.AsNSImage();
}
super(config)
this.type = 'popover'
this._addLiveProperty('label', config.label)
+ this._addLiveProperty('icon', config.icon)
this.showCloseButton = config.showCloseButton
this.child = config.items
if (!(this.child instanceof TouchBar)) {