Styling: support styling for recently merged PR #378

This commit is contained in:
Karl Tauber
2021-09-15 23:43:41 +02:00
parent fd15b63044
commit c659638fb4
3 changed files with 10 additions and 4 deletions

View File

@@ -89,10 +89,10 @@ public class FlatTextFieldUI
@Styleable protected Color inactiveBackground;
@Styleable protected Color placeholderForeground;
@Styleable protected Color focusedBackground;
/** @since 2 */ protected int iconTextGap;
/** @since 2 */ @Styleable protected int iconTextGap;
/** @since 2 */ protected Icon leadingIcon;
/** @since 2 */ protected Icon trailingIcon;
/** @since 2 */ @Styleable protected Icon leadingIcon;
/** @since 2 */ @Styleable protected Icon trailingIcon;
private Color oldDisabledBackground;
private Color oldInactiveBackground;

View File

@@ -778,7 +778,10 @@ public class TestFlatStyleableInfo
"disabledBackground", Color.class,
"inactiveBackground", Color.class,
"placeholderForeground", Color.class,
"focusedBackground", Color.class
"focusedBackground", Color.class,
"iconTextGap", int.class,
"leadingIcon", Icon.class,
"trailingIcon", Icon.class
);
// border

View File

@@ -890,6 +890,9 @@ public class TestFlatStyling
ui.applyStyle( "inactiveBackground: #fff" );
ui.applyStyle( "placeholderForeground: #fff" );
ui.applyStyle( "focusedBackground: #fff" );
ui.applyStyle( "iconTextGap: 4" );
ui.applyStyle( "leadingIcon: com.formdev.flatlaf.icons.FlatSearchIcon" );
ui.applyStyle( "trailingIcon: com.formdev.flatlaf.icons.FlatClearIcon" );
// border
flatTextBorder( style -> ui.applyStyle( style ) );