<Swing Dev> RFR JDK-7184956: [macosx] JPopupMenu.setDefaultLightPopupEnable(true) doesn't work correctly
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Thu Jul 23 23:15:50 UTC 2020
Hi, Prasanta.
> This is because com.apple.laf.ScreenPopupFactory#getPopup method always sets HEAVY_WEIGHT_POPUP when com.apple.laf.ScreenPopupFactory#fIsActive is true and fIsActive is always set to true in AquaLookAndFeel#initialize()>> Proposed fix is to use PopupFactory.getPopup() and let the PopupFactory decide which popup type to show.
I would like to highlight that the ScreenPopupFactory itself is also a PopupFactory, and
it intentionally overrides getPopup() method to always return HW popup, because other
popup types are not implemented by the Aqua L&F, you can check that by the menubar/menuites
in the SwingSet2, after the fix the popuop menu does not look like the native popup due to
absent of shadows/transparency.
--
Best regards, Sergey.
More information about the swing-dev
mailing list