mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-09 08:15:09 +03:00
OptionPane: fixed OptionPane.sameSizeButtons, which did not work as expected when setting to false
This commit is contained in:
@@ -14,6 +14,8 @@ FlatLaf Change Log
|
||||
pressed) when running in Java 9+ on Linux, macOS. Occurs also on Windows in
|
||||
large popup menus that do not fit into the window. (issue #371; regression
|
||||
since FlatLaf 1.3)
|
||||
- OptionPane: Fixed `OptionPane.sameSizeButtons`, which did not work as expected
|
||||
when setting to `false`.
|
||||
|
||||
|
||||
## 1.5
|
||||
|
||||
@@ -91,6 +91,7 @@ public class FlatOptionPaneUI
|
||||
protected int messagePadding;
|
||||
protected int maxCharactersPerLine;
|
||||
private int focusWidth;
|
||||
private boolean sameSizeButtons;
|
||||
|
||||
public static ComponentUI createUI( JComponent c ) {
|
||||
return new FlatOptionPaneUI();
|
||||
@@ -104,6 +105,7 @@ public class FlatOptionPaneUI
|
||||
messagePadding = UIManager.getInt( "OptionPane.messagePadding" );
|
||||
maxCharactersPerLine = UIManager.getInt( "OptionPane.maxCharactersPerLine" );
|
||||
focusWidth = UIManager.getInt( "Component.focusWidth" );
|
||||
sameSizeButtons = FlatUIUtils.getUIBoolean( "OptionPane.sameSizeButtons", true );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -217,6 +219,11 @@ public class FlatOptionPaneUI
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean getSizeButtonsToSameWidth() {
|
||||
return sameSizeButtons;
|
||||
}
|
||||
|
||||
//---- class NonUIResourceBorder ------------------------------------------
|
||||
|
||||
private static class NonUIResourceBorder
|
||||
|
||||
Reference in New Issue
Block a user