Store parent popover in popover touch bar items
This commit is contained in:
parent
8c8b737fa2
commit
f05dfc74da
2 changed files with 10 additions and 1 deletions
|
@ -126,7 +126,15 @@ static NSString* const ImageScrubberItemIdentifier = @"scrubber.image.item";
|
|||
type:item_type];
|
||||
if (!identifier) return;
|
||||
|
||||
NSTouchBarItem* item = [touchBar itemForIdentifier:identifier];
|
||||
NSTouchBar* targetTouchBar = touchBar;
|
||||
|
||||
std::string popover_id;
|
||||
if (settings.Get("_popover", &popover_id)) {
|
||||
NSPopoverTouchBarItem* popoverItem = [touchBar itemForIdentifier:[self identifierFromID:popover_id type:"popover"]];
|
||||
targetTouchBar = popoverItem.popoverTouchBar;
|
||||
}
|
||||
|
||||
NSTouchBarItem* item = [targetTouchBar itemForIdentifier:identifier];
|
||||
if (!item) return;
|
||||
|
||||
if (item_type == "button") {
|
||||
|
|
|
@ -223,6 +223,7 @@ TouchBar.TouchBarPopover = class TouchBarPopover extends TouchBarItem {
|
|||
if (!(this.child instanceof TouchBar)) {
|
||||
this.child = new TouchBar(this.child)
|
||||
}
|
||||
this.child.ordereredItems.forEach((item) => item._popover = this.id)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue