mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Fixed a missing call to lf.preparePopupMenuWindow in PopupMenu
This commit is contained in:
parent
151e3f769e
commit
e74849ccfb
1 changed files with 7 additions and 4 deletions
|
|
@ -221,9 +221,11 @@ public:
|
|||
setLookAndFeel (parent != nullptr ? &(parent->getLookAndFeel())
|
||||
: menu.lookAndFeel.get());
|
||||
|
||||
parentComponent = getLookAndFeel().getParentComponentForMenuOptions (options);
|
||||
LookAndFeel& lf = getLookAndFeel();
|
||||
|
||||
setOpaque (getLookAndFeel().findColour (PopupMenu::backgroundColourId).isOpaque()
|
||||
parentComponent = lf.getParentComponentForMenuOptions (options);
|
||||
|
||||
setOpaque (lf.findColour (PopupMenu::backgroundColourId).isOpaque()
|
||||
|| ! Desktop::canUseSemiTransparentWindows());
|
||||
|
||||
for (int i = 0; i < menu.items.size(); ++i)
|
||||
|
|
@ -259,11 +261,13 @@ public:
|
|||
{
|
||||
addToDesktop (ComponentPeer::windowIsTemporary
|
||||
| ComponentPeer::windowIgnoresKeyPresses
|
||||
| getLookAndFeel().getMenuWindowFlags());
|
||||
| lf.getMenuWindowFlags());
|
||||
|
||||
getActiveWindows().add (this);
|
||||
Desktop::getInstance().addGlobalMouseListener (this);
|
||||
}
|
||||
|
||||
lf.preparePopupMenuWindow (*this);
|
||||
}
|
||||
|
||||
~MenuWindow()
|
||||
|
|
@ -903,7 +907,6 @@ public:
|
|||
.withTargetComponent (nullptr),
|
||||
false, dismissOnMouseUp, managerOfChosenCommand);
|
||||
|
||||
getLookAndFeel().preparePopupMenuWindow (*activeSubMenu);
|
||||
activeSubMenu->setVisible (true); // (must be called before enterModalState on Windows to avoid DropShadower confusion)
|
||||
activeSubMenu->enterModalState (false);
|
||||
activeSubMenu->toFront (false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue