mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-05 03:50:07 +00:00
Fixed an issue where the scale of a PopupMenu would be incorrect when no targetComponent was specifiefd
This commit is contained in:
parent
2540725b6a
commit
b574d4530e
1 changed files with 2 additions and 1 deletions
|
|
@ -217,7 +217,8 @@ public:
|
|||
parentComponent = lf.getParentComponentForMenuOptions (options);
|
||||
|
||||
if (parentComponent == nullptr && parentWindow == nullptr && lf.shouldPopupMenuScaleWithTargetComponent (options))
|
||||
scaleFactor = getApproximateScaleFactorForTargetComponent (options.getTargetComponent());
|
||||
if (auto* targetComponent = options.getTargetComponent())
|
||||
scaleFactor = getApproximateScaleFactorForTargetComponent (targetComponent);
|
||||
|
||||
setOpaque (lf.findColour (PopupMenu::backgroundColourId).isOpaque()
|
||||
|| ! Desktop::canUseSemiTransparentWindows());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue