Browse Source

Fixed a bug where PopupMenus with a border size of 0 were being immediately dismissed

tags/2021-05-28
ed 7 years ago
parent
commit
8b81379c46
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      modules/juce_gui_basics/menus/juce_PopupMenu.cpp

+ 3
- 0
modules/juce_gui_basics/menus/juce_PopupMenu.cpp View File

@@ -666,6 +666,9 @@ public:
else
x = jmax (parentArea.getX() + 4, target.getX() - widthToUse);
if (getLookAndFeel().getPopupMenuBorderSize() == 0) // workaround for dismissing the window on mouse up when border size is 0
x += tendTowardsRight ? 1 : -1;
y = target.getY();
if (target.getCentreY() > parentArea.getCentreY())
y = jmax (parentArea.getY(), target.getBottom() - heightToUse);


Loading…
Cancel
Save