mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-07 22:40:53 +03:00
make component outline border wider if focus width is zero
This commit is contained in:
@@ -69,6 +69,7 @@ public class FlatBorder
|
||||
{
|
||||
protected final int focusWidth = UIManager.getInt( "Component.focusWidth" );
|
||||
protected final float innerFocusWidth = FlatUIUtils.getUIFloat( "Component.innerFocusWidth", 0 );
|
||||
protected final float innerOutlineWidth = FlatUIUtils.getUIFloat( "Component.innerOutlineWidth", 0 );
|
||||
protected final Color focusColor = UIManager.getColor( "Component.focusColor" );
|
||||
protected final Color borderColor = UIManager.getColor( "Component.borderColor" );
|
||||
protected final Color disabledBorderColor = UIManager.getColor( "Component.disabledBorderColor" );
|
||||
@@ -93,7 +94,9 @@ public class FlatBorder
|
||||
Color outlineColor = getOutlineColor( c );
|
||||
|
||||
if( outlineColor != null || isFocused( c ) ) {
|
||||
float innerFocusWidth = !(c instanceof JScrollPane) ? this.innerFocusWidth : 0;
|
||||
float innerFocusWidth = !(c instanceof JScrollPane)
|
||||
? (outlineColor != null ? innerOutlineWidth : this.innerFocusWidth)
|
||||
: 0;
|
||||
|
||||
g2.setColor( (outlineColor != null) ? outlineColor : getFocusColor( c ) );
|
||||
FlatUIUtils.paintComponentOuterBorder( g2, x, y, width, height, focusWidth,
|
||||
|
||||
@@ -27,6 +27,7 @@ Button.default.boldText=true
|
||||
|
||||
Component.focusWidth=2
|
||||
Component.innerFocusWidth=0
|
||||
Component.innerOutlineWidth=0
|
||||
Component.arrowType=triangle
|
||||
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ CheckBox.icon.selectedPressedBackground=#72A1D4
|
||||
|
||||
Component.focusWidth=2
|
||||
Component.innerFocusWidth=0
|
||||
Component.innerOutlineWidth=0
|
||||
Component.arrowType=triangle
|
||||
|
||||
|
||||
|
||||
@@ -185,6 +185,7 @@ ComboBox.padding=2,6,2,6
|
||||
|
||||
Component.focusWidth=0
|
||||
Component.innerFocusWidth={float}0.5
|
||||
Component.innerOutlineWidth={float}1
|
||||
Component.arc=5
|
||||
Component.minimumWidth=64
|
||||
Component.arrowType=chevron
|
||||
|
||||
@@ -211,6 +211,7 @@ Component.focusedBorderColor #466d94 javax.swing.plaf.ColorUIResource [UI]
|
||||
Component.grayFilter [lazy] [unknown type] com.formdev.flatlaf.util.GrayFilter
|
||||
Component.hideMnemonics true
|
||||
Component.innerFocusWidth 0.5
|
||||
Component.innerOutlineWidth 1.0
|
||||
Component.linkColor #589df6 javax.swing.plaf.ColorUIResource [UI]
|
||||
Component.minimumWidth 64
|
||||
Component.warning.borderColor #725627 javax.swing.plaf.ColorUIResource [UI]
|
||||
|
||||
@@ -212,6 +212,7 @@ Component.focusedBorderColor #87afda javax.swing.plaf.ColorUIResource [UI]
|
||||
Component.grayFilter [lazy] [unknown type] com.formdev.flatlaf.util.GrayFilter
|
||||
Component.hideMnemonics true
|
||||
Component.innerFocusWidth 0.5
|
||||
Component.innerOutlineWidth 1.0
|
||||
Component.linkColor #2470b3 javax.swing.plaf.ColorUIResource [UI]
|
||||
Component.minimumWidth 64
|
||||
Component.warning.borderColor #fed284 javax.swing.plaf.ColorUIResource [UI]
|
||||
|
||||
Reference in New Issue
Block a user