diff --git a/res/images/skins/default/palette.png b/res/images/skins/default/palette.png index 8e6dd339bf3..113a44c9868 100644 Binary files a/res/images/skins/default/palette.png and b/res/images/skins/default/palette.png differ diff --git a/res/images/skins/rebel/btnLdown.png b/res/images/skins/rebel/btnLdown.png index 1ebc3acbe33..018d6fbf67e 100644 Binary files a/res/images/skins/rebel/btnLdown.png and b/res/images/skins/rebel/btnLdown.png differ diff --git a/res/images/skins/rebel/btnLover.png b/res/images/skins/rebel/btnLover.png index f1c1d5a88a1..a143747f215 100644 Binary files a/res/images/skins/rebel/btnLover.png and b/res/images/skins/rebel/btnLover.png differ diff --git a/res/images/skins/rebel/btnLup.png b/res/images/skins/rebel/btnLup.png index 6c115d054ed..756fb2782f5 100644 Binary files a/res/images/skins/rebel/btnLup.png and b/res/images/skins/rebel/btnLup.png differ diff --git a/res/images/skins/rebel/btnMdown.png b/res/images/skins/rebel/btnMdown.png index d53b4fff943..9cd95dd77d2 100644 Binary files a/res/images/skins/rebel/btnMdown.png and b/res/images/skins/rebel/btnMdown.png differ diff --git a/res/images/skins/rebel/btnMover.png b/res/images/skins/rebel/btnMover.png index 7e23fca1e26..855eebf9cb2 100644 Binary files a/res/images/skins/rebel/btnMover.png and b/res/images/skins/rebel/btnMover.png differ diff --git a/res/images/skins/rebel/btnMup.png b/res/images/skins/rebel/btnMup.png index 46d6e9f8b67..faf91bd85cc 100644 Binary files a/res/images/skins/rebel/btnMup.png and b/res/images/skins/rebel/btnMup.png differ diff --git a/res/images/skins/rebel/btnRdown.png b/res/images/skins/rebel/btnRdown.png index bd2037c3329..2a5f9fd2798 100644 Binary files a/res/images/skins/rebel/btnRdown.png and b/res/images/skins/rebel/btnRdown.png differ diff --git a/res/images/skins/rebel/btnRover.png b/res/images/skins/rebel/btnRover.png index 89568942f54..a44fa611caa 100644 Binary files a/res/images/skins/rebel/btnRover.png and b/res/images/skins/rebel/btnRover.png differ diff --git a/res/images/skins/rebel/btnRup.png b/res/images/skins/rebel/btnRup.png index 4fa0da6134e..f2ef29a1350 100644 Binary files a/res/images/skins/rebel/btnRup.png and b/res/images/skins/rebel/btnRup.png differ diff --git a/res/images/skins/rebel/palette.png b/res/images/skins/rebel/palette.png index bc8914b79a9..a907374cbf9 100644 Binary files a/res/images/skins/rebel/palette.png and b/res/images/skins/rebel/palette.png differ diff --git a/src/main/java/forge/gui/skin/FRoundedPanel.java b/src/main/java/forge/gui/skin/FRoundedPanel.java index 59d1659f6eb..0a2d3fe9ebf 100644 --- a/src/main/java/forge/gui/skin/FRoundedPanel.java +++ b/src/main/java/forge/gui/skin/FRoundedPanel.java @@ -8,6 +8,8 @@ import java.awt.RenderingHints; import javax.swing.JPanel; +import forge.AllZone; + /** *

* FRoundedPanel. @@ -20,12 +22,9 @@ import javax.swing.JPanel; */ @SuppressWarnings("serial") public class FRoundedPanel extends JPanel { - - /** The corners. */ private boolean[] corners = { true, true, true, true }; // NW, SW, SE, NE - private Color shadowColor = new Color(150, 150, 150, 150); - private Color borderColor = Color.black; + private Color borderColor = AllZone.getSkin().getClrBorders(); private int shadowOffset = 5; private int cornerRadius = 10; private boolean showShadow = false; @@ -58,14 +57,11 @@ public class FRoundedPanel extends JPanel { } /** - *

- * FRoundedPanel. - *

+ * paintComponent is the guts of FRoundedPanel. It paints the borders + * and rounded corners determined by the conditional arrays borders[ ] + * and corners[ ]. * - * Constructor. - * - * @param g - * the g + * @param g   Graphics obj */ @Override protected void paintComponent(final Graphics g) { diff --git a/src/main/java/forge/gui/skin/FSkin.java b/src/main/java/forge/gui/skin/FSkin.java index 92c07a917bc..e1a9e2e712a 100644 --- a/src/main/java/forge/gui/skin/FSkin.java +++ b/src/main/java/forge/gui/skin/FSkin.java @@ -79,6 +79,18 @@ public class FSkin { /** Color of text in skin. */ private Color clrText = Color.red; + /** Color of background in progress bar if unfilled. */ + private Color clrProgress1 = Color.red; + + /** Color of text in progress bar if filled. */ + private Color clrProgress2 = Color.red; + + /** Color of background in progress bar if unfilled. */ + private Color clrProgress3 = Color.red; + + /** Color of text in progress bar if filled. */ + private Color clrProgress4 = Color.red; + /** Name of skin. */ private String name = "default"; @@ -124,11 +136,7 @@ public class FSkin { * the exception */ public FSkin(final String skinName) throws Exception { - this.loadFontAndImages("default"); - - if (!skinName.equals("default")) { - this.loadFontAndImages(skinName); - } + this.loadFontAndImages(skinName); } /** @@ -168,6 +176,10 @@ public class FSkin { this.setClrActive(this.getColorFromPixel(image.getRGB(60, 90))); this.setClrInactive(this.getColorFromPixel(image.getRGB(60, 110))); this.setClrText(this.getColorFromPixel(image.getRGB(60, 130))); + this.setClrProgress1(this.getColorFromPixel(image.getRGB(55, 145))); + this.setClrProgress2(this.getColorFromPixel(image.getRGB(65, 145))); + this.setClrProgress3(this.getColorFromPixel(image.getRGB(55, 155))); + this.setClrProgress4(this.getColorFromPixel(image.getRGB(65, 155))); } catch (final IOException e) { System.err.println(this.notfound + this.paletteFile); } @@ -331,10 +343,10 @@ public class FSkin { /** * Color of zebra striping in grid displays. - * @param clrZebra0   an image icon + * @param clr0   Color obj */ - public void setClrZebra(Color clrZebra0) { - this.clrZebra = clrZebra0; + public void setClrZebra(Color clr0) { + this.clrZebra = clr0; } /** @@ -347,10 +359,10 @@ public class FSkin { /** * Color of elements in mouseover state. - * @param clrHover0   an image icon + * @param clr0   Color obj */ - public void setClrHover(Color clrHover0) { - this.clrHover = clrHover0; + public void setClrHover(Color clr0) { + this.clrHover = clr0; } /** @@ -363,10 +375,10 @@ public class FSkin { /** * Color of active (currently selected) elements. - * @param clrActive0   an image icon + * @param clr0   Color obj */ - public void setClrActive(Color clrActive0) { - this.clrActive = clrActive0; + public void setClrActive(Color clr0) { + this.clrActive = clr0; } /** @@ -379,10 +391,10 @@ public class FSkin { /** * Color of inactive (not currently selected) elements. - * @param clrInactive0   an image icon + * @param clr0   Color obj */ - public void setClrInactive(Color clrInactive0) { - this.clrInactive = clrInactive0; + public void setClrInactive(Color clr0) { + this.clrInactive = clr0; } /** @@ -395,10 +407,74 @@ public class FSkin { /** * Color of text in skin. - * @param clrText0   an image icon + * @param clr0   Color obj */ - public void setClrText(Color clrText0) { - this.clrText = clrText0; + public void setClrText(Color clr0) { + this.clrText = clr0; + } + + /** + * Background of progress bar, "unfilled" state. + * @return {@link javax.awt.Color} clrProgress1 + */ + public Color getClrProgress1() { + return clrProgress1; + } + + /** + * Background of progress bar, "unfilled" state. + * @param clr0   Color obj + */ + public void setClrProgress1(Color clr0) { + this.clrProgress1 = clr0; + } + + /** + * Text of progress bar, "unfilled" state. + * @return {@link javax.awt.Color} clrProgress1 + */ + public Color getClrProgress2() { + return clrProgress2; + } + + /** + * Text of progress bar, "unfilled" state. + * @param clr0   Color obj + */ + public void setClrProgress2(Color clr0) { + this.clrProgress2 = clr0; + } + + /** + * Background of progress bar, "filled" state. + * @return {@link javax.awt.Color} clrProgress1 + */ + public Color getClrProgress3() { + return clrProgress3; + } + + /** + * Background of progress bar, "filled" state. + * @param clr0   Color obj + */ + public void setClrProgress3(Color clr0) { + this.clrProgress3 = clr0; + } + + /** + * Text of progress bar, "filled" state. + * @return {@link javax.awt.Color} clrProgress1 + */ + public Color getClrProgress4() { + return clrProgress4; + } + + /** + * Text of progress bar, "filled" state. + * @param clr0   Color obj + */ + public void setClrProgress4(Color clr0) { + this.clrProgress4 = clr0; } /** diff --git a/src/main/java/forge/view/swing/ApplicationView.java b/src/main/java/forge/view/swing/ApplicationView.java index 11081786481..05f96649970 100644 --- a/src/main/java/forge/view/swing/ApplicationView.java +++ b/src/main/java/forge/view/swing/ApplicationView.java @@ -112,7 +112,7 @@ public class ApplicationView implements FView { OldGuiNewGame.getUpldDrftCheckBox().setSelected(preferences.isUploadDraftAI()); OldGuiNewGame.getFoilRandomCheckBox().setSelected(preferences.isRandCFoil()); - AllZone.setSkin(new FSkin(preferences.getSkin())); + AllZone.setSkin(AllZone.getSkin()); } catch (final Exception exn) { Log.error("Error loading preferences: " + exn); diff --git a/src/main/java/forge/view/swing/SplashFrame.java b/src/main/java/forge/view/swing/SplashFrame.java index 88642d9e4ee..ffb0f97f6b6 100644 --- a/src/main/java/forge/view/swing/SplashFrame.java +++ b/src/main/java/forge/view/swing/SplashFrame.java @@ -16,6 +16,7 @@ import javax.swing.KeyStroke; import javax.swing.SwingConstants; import javax.swing.SwingUtilities; import javax.swing.UIManager; +import javax.swing.border.LineBorder; import net.slightlymagic.braids.util.progress_monitor.BraidsProgressMonitor; import forge.gui.skin.FSkin; @@ -128,9 +129,12 @@ public class SplashFrame extends JFrame { contentPane.getActionMap().put("escAction", new CloseAction()); - // Set UI to color splash bar fill with theme colors - UIManager.put("ProgressBar.foreground", skin.getClrTheme()); // When filled - UIManager.put("ProgressBar.selectionForeground", skin.getClrText()); // When filled + // Set UI to color splash bar fill with skin colors + UIManager.put("ProgressBar.background", skin.getClrProgress1()); // Unfilled state + UIManager.put("ProgressBar.selectionBackground", skin.getClrProgress2()); // Unfilled state + UIManager.put("ProgressBar.foreground", skin.getClrProgress3()); // Filled state + UIManager.put("ProgressBar.selectionForeground", skin.getClrProgress4()); // Filled state + UIManager.put("ProgressBar.border", new LineBorder(skin.getClrTheme(), 0)); // Instantiate model and view and tie together. this.monitorModel = new SplashProgressModel(); @@ -149,8 +153,7 @@ public class SplashFrame extends JFrame { final JLabel bgLabel = new JLabel(bgIcon); // Do not pass Integer.MIN_VALUE directly here; it must be packaged in - // an Integer - // instance. Otherwise, GUI components will not draw unless moused over. + // an Integer instance. Otherwise, GUI components will not draw unless moused over. this.getLayeredPane().add(bgLabel, Integer.valueOf(Integer.MIN_VALUE)); bgLabel.setBounds(0, 0, splashWidthPx, splashHeightPx);