| @@ -1080,6 +1080,8 @@ Component* LookAndFeel_V2::getParentComponentForMenuOptions (const PopupMenu::Op | |||||
| return options.getParentComponent(); | return options.getParentComponent(); | ||||
| } | } | ||||
| void LookAndFeel_V2::preparePopupMenuWindow (Component&) {} | |||||
| //============================================================================== | //============================================================================== | ||||
| void LookAndFeel_V2::fillTextEditorBackground (Graphics& g, int /*width*/, int /*height*/, TextEditor& textEditor) | void LookAndFeel_V2::fillTextEditorBackground (Graphics& g, int /*width*/, int /*height*/, TextEditor& textEditor) | ||||
| { | { | ||||
| @@ -162,6 +162,7 @@ public: | |||||
| void getIdealPopupMenuItemSize (const String& text, bool isSeparator, int standardMenuItemHeight, | void getIdealPopupMenuItemSize (const String& text, bool isSeparator, int standardMenuItemHeight, | ||||
| int& idealWidth, int& idealHeight) override; | int& idealWidth, int& idealHeight) override; | ||||
| int getMenuWindowFlags() override; | int getMenuWindowFlags() override; | ||||
| void preparePopupMenuWindow (Component&) override; | |||||
| void drawMenuBarBackground (Graphics&, int width, int height, bool isMouseOverBar, MenuBarComponent&) override; | void drawMenuBarBackground (Graphics&, int width, int height, bool isMouseOverBar, MenuBarComponent&) override; | ||||
| int getMenuBarItemWidth (MenuBarComponent&, int itemIndex, const String& itemText) override; | int getMenuBarItemWidth (MenuBarComponent&, int itemIndex, const String& itemText) override; | ||||
| @@ -903,6 +903,7 @@ public: | |||||
| .withTargetComponent (nullptr), | .withTargetComponent (nullptr), | ||||
| false, dismissOnMouseUp, managerOfChosenCommand); | false, dismissOnMouseUp, managerOfChosenCommand); | ||||
| getLookAndFeel().preparePopupMenuWindow (*activeSubMenu); | |||||
| activeSubMenu->setVisible (true); // (must be called before enterModalState on Windows to avoid DropShadower confusion) | activeSubMenu->setVisible (true); // (must be called before enterModalState on Windows to avoid DropShadower confusion) | ||||
| activeSubMenu->enterModalState (false); | activeSubMenu->enterModalState (false); | ||||
| activeSubMenu->toFront (false); | activeSubMenu->toFront (false); | ||||
| @@ -707,6 +707,8 @@ public: | |||||
| MenuBarComponent&) = 0; | MenuBarComponent&) = 0; | ||||
| virtual Component* getParentComponentForMenuOptions (const PopupMenu::Options& options) = 0; | virtual Component* getParentComponentForMenuOptions (const PopupMenu::Options& options) = 0; | ||||
| virtual void preparePopupMenuWindow (Component& newWindow) = 0; | |||||
| }; | }; | ||||
| private: | private: | ||||