mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
PopupMenu: made submenus inherit look+feel
This commit is contained in:
parent
53784490b2
commit
eea5e74af4
1 changed files with 7 additions and 4 deletions
|
|
@ -215,13 +215,13 @@ class PopupMenu::Window : public Component,
|
|||
private Timer
|
||||
{
|
||||
public:
|
||||
Window (const PopupMenu& menu, Window* const window,
|
||||
Window (const PopupMenu& menu, Window* const parentWindow,
|
||||
const Options& opts,
|
||||
const bool alignToRectangle,
|
||||
const bool shouldDismissOnMouseUp,
|
||||
ApplicationCommandManager** const manager)
|
||||
: Component ("menu"),
|
||||
owner (window),
|
||||
owner (parentWindow),
|
||||
options (opts),
|
||||
activeSubMenu (nullptr),
|
||||
managerOfChosenCommand (manager),
|
||||
|
|
@ -247,8 +247,11 @@ public:
|
|||
setMouseClickGrabsKeyboardFocus (false);
|
||||
setAlwaysOnTop (true);
|
||||
|
||||
setLookAndFeel (menu.lookAndFeel);
|
||||
setOpaque (getLookAndFeel().findColour (PopupMenu::backgroundColourId).isOpaque() || ! Desktop::canUseSemiTransparentWindows());
|
||||
setLookAndFeel (owner != nullptr ? &(owner->getLookAndFeel())
|
||||
: menu.lookAndFeel);
|
||||
|
||||
setOpaque (getLookAndFeel().findColour (PopupMenu::backgroundColourId).isOpaque()
|
||||
|| ! Desktop::canUseSemiTransparentWindows());
|
||||
|
||||
for (int i = 0; i < menu.items.size(); ++i)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue