Skip to content

Commit

Permalink
Fix menu background flashing effect
Browse files Browse the repository at this point in the history
When using dark theme on light platform theme, there was a
background flashing effect on popups.

See JFormDesigner#94
  • Loading branch information
cristatus committed May 14, 2020
1 parent b8f953c commit 298f0df
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ public Popup getPopup( Component owner, Component contents, int x, int y )
// macOS and Linux adds drop shadow to heavy weight popups
if( SystemInfo.IS_MAC || SystemInfo.IS_LINUX ) {
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 );
}

Expand Down

0 comments on commit 298f0df

Please sign in to comment.