mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-07 06:20:53 +03:00
Merge pull request #101 from cristatus/patch-2
Fix menu background flashing effect
This commit is contained in:
@@ -56,6 +56,10 @@ public class FlatPopupFactory
|
|||||||
// macOS and Linux adds drop shadow to heavy weight popups
|
// macOS and Linux adds drop shadow to heavy weight popups
|
||||||
if( SystemInfo.IS_MAC || SystemInfo.IS_LINUX ) {
|
if( SystemInfo.IS_MAC || SystemInfo.IS_LINUX ) {
|
||||||
Popup popup = getHeavyWeightPopup( owner, contents, x, y );
|
Popup popup = getHeavyWeightPopup( owner, contents, x, y );
|
||||||
|
if ( popup != null ) {
|
||||||
|
// fix background flashing
|
||||||
|
SwingUtilities.windowForComponent( contents ).setBackground( contents.getBackground() );
|
||||||
|
}
|
||||||
return (popup != null) ? popup : super.getPopup( owner, contents, x, y );
|
return (popup != null) ? popup : super.getPopup( owner, contents, x, y );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user