mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-07 22:40:53 +03:00
fixed jittery submenu rendering on Mac (issue #10)
This commit is contained in:
@@ -5,6 +5,7 @@ FlatLaf Change Log
|
||||
|
||||
- Support using IntelliJ platform themes (.theme.json files).
|
||||
- Fixed selection background of checkbox in table cell.
|
||||
- Fixed jittery submenu rendering on Mac. (issue #10)
|
||||
|
||||
|
||||
## 0.18
|
||||
|
||||
@@ -33,6 +33,7 @@ import javax.swing.AbstractButton;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JTabbedPane;
|
||||
import javax.swing.LookAndFeel;
|
||||
import javax.swing.PopupFactory;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.UIDefaults;
|
||||
import javax.swing.UIManager;
|
||||
@@ -92,6 +93,11 @@ public abstract class FlatLaf
|
||||
|
||||
super.initialize();
|
||||
|
||||
// make sure that a plain popup factory is used (otherwise sub-menu rendering
|
||||
// is "jittery" on Mac, where AquaLookAndFeel installs its own popup factory)
|
||||
if( PopupFactory.getSharedInstance().getClass() != PopupFactory.class )
|
||||
PopupFactory.setSharedInstance( new PopupFactory() );
|
||||
|
||||
// add mnemonic listener
|
||||
mnemonicListener = e -> {
|
||||
if( e.getKeyCode() == KeyEvent.VK_ALT )
|
||||
|
||||
Reference in New Issue
Block a user