diff --git a/src/com/jpexs/decompiler/flash/gui/MyRibbonApplicationMenuButtonUI.java b/src/com/jpexs/decompiler/flash/gui/MyRibbonApplicationMenuButtonUI.java index af8a4f40c..da46e9bd6 100644 --- a/src/com/jpexs/decompiler/flash/gui/MyRibbonApplicationMenuButtonUI.java +++ b/src/com/jpexs/decompiler/flash/gui/MyRibbonApplicationMenuButtonUI.java @@ -87,11 +87,11 @@ public class MyRibbonApplicationMenuButtonUI extends BasicRibbonApplicationMenuB g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); SubstanceSkin skin = SubstanceLookAndFeel.getCurrentSkin(); - Color darkColor = skin.getColorScheme(DecorationAreaType.SECONDARY_TITLE_PANE, ColorSchemeAssociationKind.BORDER, ComponentState.ENABLED).getUltraDarkColor(); - Color lightColor = skin.getColorScheme(DecorationAreaType.SECONDARY_TITLE_PANE, ColorSchemeAssociationKind.HIGHLIGHT, ComponentState.ENABLED).shiftBackground(Color.white, 0.5).getUltraLightColor(); - Color midColor = skin.getColorScheme(DecorationAreaType.SECONDARY_TITLE_PANE, ColorSchemeAssociationKind.FILL, ComponentState.ENABLED).getMidColor(); - - g2.setPaint(new LinearGradientPaint(0, 0, 0, getIconHeight(), new float[]{0f, 0.5f, 1f}, new Color[]{lightColor, midColor, darkColor}, MultipleGradientPaint.CycleMethod.NO_CYCLE)); + g2.setPaint(new LinearGradientPaint(0, 0, 0, getIconHeight(), new float[]{0f, 1f}, new Color[]{ + Color.white, + Color.black + }, MultipleGradientPaint.CycleMethod.NO_CYCLE + )); Shape s = new Ellipse2D.Double(x, y, getIconWidth(), getIconHeight()); g2.fill(s); @@ -99,11 +99,17 @@ public class MyRibbonApplicationMenuButtonUI extends BasicRibbonApplicationMenuB float border = (0.0625f * getIconWidth()); float wborder = (0.00625f * getIconWidth()); - g2.setPaint(lightColor); + g2.setPaint(Color.white); s = new Ellipse2D.Double(x + border, y + border, getIconWidth() - 2 * border, getIconHeight() - 2 * border); g2.fill(s); - g2.setPaint(new RadialGradientPaint(getIconWidth() / 2.0f, getIconHeight() / 2.0f, getIconWidth() / 2.0f - border - wborder, new float[]{0.2f, 1f}, new Color[]{lightColor, midColor}, MultipleGradientPaint.CycleMethod.NO_CYCLE)); + g2.setPaint(new RadialGradientPaint(getIconWidth() / 2.0f, getIconHeight() / 2.0f, getIconWidth() / 2.0f - border - wborder, new float[]{0f, 0.42236024f, 0.69565213f, 0.97722566f, 1f}, new Color[]{ + new Color(0xff, 0xff, 0xff), + new Color(0xff, 0xff, 0xff), + new Color(0xec, 0xec, 0xec), + new Color(0xb6, 0xb6, 0xb6), + new Color(0xff, 0xff, 0xff) + }, MultipleGradientPaint.CycleMethod.NO_CYCLE)); s = new Ellipse2D.Double(x + border + wborder, y + border + wborder, getIconWidth() - 2 * border - 2 * wborder, getIconHeight() - 2 * border - 2 * wborder); g2.fill(s); @@ -121,11 +127,15 @@ public class MyRibbonApplicationMenuButtonUI extends BasicRibbonApplicationMenuB g2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); SubstanceSkin skin = SubstanceLookAndFeel.getCurrentSkin(); - Color lightColor = skin.getColorScheme(DecorationAreaType.SECONDARY_TITLE_PANE, ColorSchemeAssociationKind.HIGHLIGHT, ComponentState.ROLLOVER_UNSELECTED)/*.shiftBackground(Color.white, 0.8)*/.getUltraLightColor(); + /*Color lightColor = skin.getColorScheme(DecorationAreaType.SECONDARY_TITLE_PANE, ColorSchemeAssociationKind.HIGHLIGHT, ComponentState.ROLLOVER_UNSELECTED). + getUltraLightColor(); Color midColor = skin.getColorScheme(DecorationAreaType.SECONDARY_TITLE_PANE, ColorSchemeAssociationKind.FILL, ComponentState.ROLLOVER_UNSELECTED).getMidColor(); - Color darkColor = skin.getColorScheme(DecorationAreaType.SECONDARY_TITLE_PANE, ColorSchemeAssociationKind.BORDER, ComponentState.ROLLOVER_UNSELECTED)/*.shiftBackground(new Color(0x7c, 0x7c, 0x7c), 0.8)*/.getUltraDarkColor(); - - g2.setPaint(new LinearGradientPaint(0, 0, 0, getIconHeight(), new float[]{0f, 0.5f, 1f}, new Color[]{lightColor, midColor, darkColor}, MultipleGradientPaint.CycleMethod.NO_CYCLE)); + Color darkColor = skin.getColorScheme(DecorationAreaType.SECONDARY_TITLE_PANE, ColorSchemeAssociationKind.BORDER, ComponentState.ROLLOVER_UNSELECTED).getUltraDarkColor(); + */ + g2.setPaint(new LinearGradientPaint(0, 0, 0, getIconHeight(), new float[]{0f, 1f}, new Color[]{ + Color.white, + Color.black + }, MultipleGradientPaint.CycleMethod.NO_CYCLE)); Shape s = new Ellipse2D.Double(x, y, getIconWidth(), getIconHeight()); g2.fill(s); @@ -133,11 +143,17 @@ public class MyRibbonApplicationMenuButtonUI extends BasicRibbonApplicationMenuB float border = (0.0625f * getIconWidth()); float wborder = (0.00625f * getIconWidth()); - g2.setPaint(lightColor); + g2.setPaint(Color.white); s = new Ellipse2D.Double(x + border, y + border, getIconWidth() - 2 * border, getIconHeight() - 2 * border); g2.fill(s); - g2.setPaint(new RadialGradientPaint(getIconWidth() / 2.0f, getIconHeight() / 2.0f, getIconWidth() / 2.0f - border - wborder, new float[]{0.2f, 1f}, new Color[]{lightColor, midColor}, MultipleGradientPaint.CycleMethod.NO_CYCLE)); + g2.setPaint(new RadialGradientPaint(getIconWidth() / 2.0f, getIconHeight() / 2.0f, getIconWidth() / 2.0f - border - wborder, new float[]{0f, 0.42236024f, 0.69565213f, 0.97722566f, 1f}, new Color[]{ + new Color(0xff, 0xff, 0xff), + new Color(0xff, 0xff, 0xff), + new Color(0xec, 0xec, 0xec), + new Color(0xb6, 0xb6, 0xb6), + new Color(0xff, 0xff, 0xff) + }, MultipleGradientPaint.CycleMethod.NO_CYCLE)); s = new Ellipse2D.Double(x + border + wborder, y + border + wborder, getIconWidth() - 2 * border - 2 * wborder, getIconHeight() - 2 * border - 2 * wborder); g2.fill(s); super.paintIcon(c, g, x, y); @@ -154,11 +170,14 @@ public class MyRibbonApplicationMenuButtonUI extends BasicRibbonApplicationMenuB g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); SubstanceSkin skin = SubstanceLookAndFeel.getCurrentSkin(); - Color lightColor = skin.getColorScheme(DecorationAreaType.SECONDARY_TITLE_PANE, ColorSchemeAssociationKind.FILL, ComponentState.ROLLOVER_SELECTED).getUltraLightColor(); + /*Color lightColor = skin.getColorScheme(DecorationAreaType.SECONDARY_TITLE_PANE, ColorSchemeAssociationKind.FILL, ComponentState.ROLLOVER_SELECTED).getUltraLightColor(); Color midColor = skin.getColorScheme(DecorationAreaType.SECONDARY_TITLE_PANE, ColorSchemeAssociationKind.FILL, ComponentState.ROLLOVER_SELECTED).getMidColor(); Color darkColor = skin.getColorScheme(DecorationAreaType.SECONDARY_TITLE_PANE, ColorSchemeAssociationKind.FILL, ComponentState.ROLLOVER_SELECTED).shiftBackground(Color.black, 0.7).getUltraDarkColor(); - - g2.setPaint(new LinearGradientPaint(0, 0, 0, getIconHeight(), new float[]{0f, 0.5f, 1f}, new Color[]{lightColor, midColor, darkColor}, MultipleGradientPaint.CycleMethod.NO_CYCLE)); + */ + g2.setPaint(new LinearGradientPaint(0, 0, 0, getIconHeight(), new float[]{0f, 1f}, new Color[]{ + Color.white, + Color.black + }, MultipleGradientPaint.CycleMethod.NO_CYCLE)); Shape s = new Ellipse2D.Double(x, y, getIconWidth(), getIconHeight()); g2.fill(s); @@ -166,11 +185,17 @@ public class MyRibbonApplicationMenuButtonUI extends BasicRibbonApplicationMenuB float border = (0.0625f * getIconWidth()); float wborder = (0.00625f * getIconWidth()); - g2.setPaint(lightColor); + g2.setPaint(Color.white); s = new Ellipse2D.Double(x + border, y + border, getIconWidth() - 2 * border, getIconHeight() - 2 * border); g2.fill(s); - g2.setPaint(new RadialGradientPaint(getIconWidth() / 2.0f, getIconHeight() / 2.0f, getIconWidth() / 2.0f - border - wborder, new float[]{0.2f, 1f}, new Color[]{lightColor, midColor}, MultipleGradientPaint.CycleMethod.NO_CYCLE)); + g2.setPaint(new RadialGradientPaint(getIconWidth() / 2.0f, getIconHeight() / 2.0f, getIconWidth() / 2.0f - border - wborder, new float[]{0f, 0.1f, 0.5f, 0.97722566f, 1f}, new Color[]{ + new Color(0xff, 0xff, 0xff), + new Color(0xff, 0xff, 0xff), + new Color(0xec, 0xec, 0xec), + new Color(0xb6, 0xb6, 0xb6), + new Color(0xff, 0xff, 0xff) + }, MultipleGradientPaint.CycleMethod.NO_CYCLE)); s = new Ellipse2D.Double(x + border + wborder, y + border + wborder, getIconWidth() - 2 * border - 2 * wborder, getIconHeight() - 2 * border - 2 * wborder); g2.fill(s); diff --git a/src/com/jpexs/decompiler/flash/gui/View.java b/src/com/jpexs/decompiler/flash/gui/View.java index 833da13a8..954bef240 100644 --- a/src/com/jpexs/decompiler/flash/gui/View.java +++ b/src/com/jpexs/decompiler/flash/gui/View.java @@ -306,7 +306,7 @@ public class View { List images = new ArrayList<>(); MyResizableIcon[] icons = MyRibbonApplicationMenuButtonUI.getIcons(); MyResizableIcon icon = icons[1]; - int sizes[] = new int[]{16, 32, 48, 256}; + int sizes[] = new int[]{256, 128, 64, 42, 40, 32, 20, 16}; for (int size : sizes) { icon.setIconSize(size, size); BufferedImage bi = new BufferedImage(size, size, BufferedImage.TYPE_4BYTE_ABGR);