diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatMenuItemArrowIcon.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatMenuItemArrowIcon.java index 984a12a3..2075a369 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatMenuItemArrowIcon.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatMenuItemArrowIcon.java @@ -21,14 +21,16 @@ import java.awt.Graphics; import java.awt.Graphics2D; /** - * "arrow" icon for {@link javax.swing.JMenuItem}. + * "arrow" icon for {@link javax.swing.JMenuItem}, {@link javax.swing.JCheckBoxMenuItem} + * and {@link javax.swing.JRadioButtonMenuItem}. * * @author Karl Tauber */ public class FlatMenuItemArrowIcon - extends FlatMenuArrowIcon + extends FlatAbstractIcon { public FlatMenuItemArrowIcon() { + super( 6, 10, null ); } @Override diff --git a/flatlaf-core/src/test/java/com/formdev/flatlaf/ui/TestFlatStyleableInfo.java b/flatlaf-core/src/test/java/com/formdev/flatlaf/ui/TestFlatStyleableInfo.java index bced364e..a70f51a4 100644 --- a/flatlaf-core/src/test/java/com/formdev/flatlaf/ui/TestFlatStyleableInfo.java +++ b/flatlaf-core/src/test/java/com/formdev/flatlaf/ui/TestFlatStyleableInfo.java @@ -301,7 +301,6 @@ public class TestFlatStyleableInfo Map> expected = new LinkedHashMap<>(); menuItem( expected ); - menuItem_arrowIcon( expected ); assertMapEquals( expected, ui.getStyleableInfos( c ) ); } @@ -314,7 +313,6 @@ public class TestFlatStyleableInfo Map> expected = new LinkedHashMap<>(); menuItem( expected ); menuItem_checkIcon( expected ); - menuItem_arrowIcon( expected ); assertMapEquals( expected, ui.getStyleableInfos( c ) ); } @@ -327,7 +325,6 @@ public class TestFlatStyleableInfo Map> expected = new LinkedHashMap<>(); menuItem( expected ); menuItem_checkIcon( expected ); - menuItem_arrowIcon( expected ); assertMapEquals( expected, ui.getStyleableInfos( c ) ); } @@ -1147,17 +1144,6 @@ public class TestFlatStyleableInfo assertMapEquals( expected, icon.getStyleableInfos() ); } - @Test - void flatMenuItemArrowIcon() { - FlatMenuItemArrowIcon icon = new FlatMenuItemArrowIcon(); - - // FlatMenuItemArrowIcon extends FlatMenuArrowIcon - Map> expected = new LinkedHashMap<>(); - flatMenuArrowIcon( expected ); - - assertMapEquals( expected, icon.getStyleableInfos() ); - } - private void flatMenuArrowIcon( Map> expected ) { expectedMap( expected, "arrowType", String.class, diff --git a/flatlaf-core/src/test/java/com/formdev/flatlaf/ui/TestFlatStyling.java b/flatlaf-core/src/test/java/com/formdev/flatlaf/ui/TestFlatStyling.java index 05d46ce8..45f25a22 100644 --- a/flatlaf-core/src/test/java/com/formdev/flatlaf/ui/TestFlatStyling.java +++ b/flatlaf-core/src/test/java/com/formdev/flatlaf/ui/TestFlatStyling.java @@ -455,7 +455,6 @@ public class TestFlatStyling Consumer applyStyle = style -> ui.applyStyle( style ); menuItem( applyStyle ); - menuItem_arrowIcon( applyStyle ); } @Test @@ -466,7 +465,6 @@ public class TestFlatStyling Consumer applyStyle = style -> ui.applyStyle( style ); menuItem( applyStyle ); menuItem_checkIcon( applyStyle ); - menuItem_arrowIcon( applyStyle ); } @Test @@ -477,7 +475,6 @@ public class TestFlatStyling Consumer applyStyle = style -> ui.applyStyle( style ); menuItem( applyStyle ); menuItem_checkIcon( applyStyle ); - menuItem_arrowIcon( applyStyle ); } private void menuItem( Consumer applyStyle ) { @@ -1366,18 +1363,6 @@ public class TestFlatStyling void flatMenuArrowIcon() { FlatMenuArrowIcon icon = new FlatMenuArrowIcon(); - flatMenuArrowIcon( icon ); - } - - @Test - void flatMenuItemArrowIcon() { - FlatMenuItemArrowIcon icon = new FlatMenuItemArrowIcon(); - - // FlatMenuItemArrowIcon extends FlatMenuArrowIcon - flatMenuArrowIcon( icon ); - } - - private void flatMenuArrowIcon( FlatMenuArrowIcon icon ) { icon.applyStyleProperty( "arrowType", "chevron" ); icon.applyStyleProperty( "arrowColor", Color.WHITE ); icon.applyStyleProperty( "disabledArrowColor", Color.WHITE );