mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-09 16:25:10 +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
|
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
|
large popup menus that do not fit into the window. (issue #371; regression
|
||||||
since FlatLaf 1.3)
|
since FlatLaf 1.3)
|
||||||
|
- OptionPane: Fixed `OptionPane.sameSizeButtons`, which did not work as expected
|
||||||
|
when setting to `false`.
|
||||||
|
|
||||||
|
|
||||||
## 1.5
|
## 1.5
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ public class FlatOptionPaneUI
|
|||||||
protected int messagePadding;
|
protected int messagePadding;
|
||||||
protected int maxCharactersPerLine;
|
protected int maxCharactersPerLine;
|
||||||
private int focusWidth;
|
private int focusWidth;
|
||||||
|
private boolean sameSizeButtons;
|
||||||
|
|
||||||
public static ComponentUI createUI( JComponent c ) {
|
public static ComponentUI createUI( JComponent c ) {
|
||||||
return new FlatOptionPaneUI();
|
return new FlatOptionPaneUI();
|
||||||
@@ -104,6 +105,7 @@ public class FlatOptionPaneUI
|
|||||||
messagePadding = UIManager.getInt( "OptionPane.messagePadding" );
|
messagePadding = UIManager.getInt( "OptionPane.messagePadding" );
|
||||||
maxCharactersPerLine = UIManager.getInt( "OptionPane.maxCharactersPerLine" );
|
maxCharactersPerLine = UIManager.getInt( "OptionPane.maxCharactersPerLine" );
|
||||||
focusWidth = UIManager.getInt( "Component.focusWidth" );
|
focusWidth = UIManager.getInt( "Component.focusWidth" );
|
||||||
|
sameSizeButtons = FlatUIUtils.getUIBoolean( "OptionPane.sameSizeButtons", true );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -217,6 +219,11 @@ public class FlatOptionPaneUI
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean getSizeButtonsToSameWidth() {
|
||||||
|
return sameSizeButtons;
|
||||||
|
}
|
||||||
|
|
||||||
//---- class NonUIResourceBorder ------------------------------------------
|
//---- class NonUIResourceBorder ------------------------------------------
|
||||||
|
|
||||||
private static class NonUIResourceBorder
|
private static class NonUIResourceBorder
|
||||||
|
|||||||
Reference in New Issue
Block a user