mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Add live popover icon property
This commit is contained in:
@@ -333,10 +333,11 @@ static NSTouchBarItemIdentifier SliderIdentifier = @"com.electron.touchbar.slide
|
||||
- (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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user