diff --git a/Mage.Client/src/main/java/mage/client/cards/CardsList.java b/Mage.Client/src/main/java/mage/client/cards/CardsList.java index 0b810c4106f5..3f6169d2958a 100644 --- a/Mage.Client/src/main/java/mage/client/cards/CardsList.java +++ b/Mage.Client/src/main/java/mage/client/cards/CardsList.java @@ -114,7 +114,7 @@ private void makeTransparent() { panelCardArea.setOpaque(false); cardArea.setOpaque(false); panelCardArea.getViewport().setOpaque(false); - panelControl.setBackground(new Color(250, 250, 250, 150)); + panelControl.setBackground(PreferencesDialog.getCurrentTheme().getDeckEditorToolbarBackgroundColor()); panelControl.setOpaque(true); cbSortBy.setModel(new DefaultComboBoxModel<>(SortBy.values())); } diff --git a/Mage.Client/src/main/java/mage/client/cards/DragCardGrid.java b/Mage.Client/src/main/java/mage/client/cards/DragCardGrid.java index 53c3492ce608..38b892307257 100644 --- a/Mage.Client/src/main/java/mage/client/cards/DragCardGrid.java +++ b/Mage.Client/src/main/java/mage/client/cards/DragCardGrid.java @@ -857,7 +857,7 @@ public void mouseDragged(MouseEvent e) { JPanel toolbar = new JPanel(new BorderLayout()); JPanel toolbarInner = new JPanel(); - toolbar.setBackground(new Color(250, 250, 250, 150)); + toolbar.setBackground(PreferencesDialog.getCurrentTheme().getDeckEditorToolbarBackgroundColor()); toolbar.setOpaque(true); toolbarInner.setOpaque(false); toolbarInner.add(deckNameAndCountLabel); diff --git a/Mage.Client/src/main/java/mage/client/deckeditor/CardSelector.java b/Mage.Client/src/main/java/mage/client/deckeditor/CardSelector.java index 1ef48a9400e0..cc2c4cc96574 100644 --- a/Mage.Client/src/main/java/mage/client/deckeditor/CardSelector.java +++ b/Mage.Client/src/main/java/mage/client/deckeditor/CardSelector.java @@ -10,6 +10,7 @@ import mage.client.MageFrame; import mage.client.cards.*; import mage.client.constants.Constants.SortBy; +import mage.client.dialog.PreferencesDialog; import mage.client.deckeditor.table.TableModel; import mage.client.dialog.CheckBoxList; import mage.client.util.GUISizeHelper; @@ -97,11 +98,11 @@ private void makeTransparent() { jTextFieldSearch.addActionListener(searchAction); // make the components more readable - tbColor.setBackground(new Color(250, 250, 250, 150)); + tbColor.setBackground(PreferencesDialog.getCurrentTheme().getDeckEditorToolbarBackgroundColor()); tbColor.setOpaque(true); // false = transparent - tbTypes.setBackground(new Color(250, 250, 250, 150)); + tbTypes.setBackground(PreferencesDialog.getCurrentTheme().getDeckEditorToolbarBackgroundColor()); tbTypes.setOpaque(true); // false = transparent - cardSelectorBottomPanel.setBackground(new Color(250, 250, 250, 150)); + cardSelectorBottomPanel.setBackground(PreferencesDialog.getCurrentTheme().getDeckEditorToolbarBackgroundColor()); cardSelectorBottomPanel.setOpaque(true); // false = transparent } diff --git a/Mage.Client/src/main/java/mage/client/themes/ThemeType.java b/Mage.Client/src/main/java/mage/client/themes/ThemeType.java index b26c41025421..e52404cb4916 100644 --- a/Mage.Client/src/main/java/mage/client/themes/ThemeType.java +++ b/Mage.Client/src/main/java/mage/client/themes/ThemeType.java @@ -13,29 +13,29 @@ */ public enum ThemeType { // https://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/_nimbusDefaults.html - DEFAULT("Default", - "", - true, - false, - true, - true, - true, - true, - true, - new Color(169, 176, 190), // nimbusBlueGrey - new Color(214, 217, 223), // control - new Color(255, 255, 255), // nimbusLightBackground - new Color(242, 242, 189), // info - new Color(51, 98, 140), // nimbusBase - null, // mageToolbar + DEFAULT("Default", // name + "", // path + true, // hasBackground + false, // hasLoginBackground + true, // hasBattleBackground + true, // hasSkipButtons + true, // hasPhaseIcons + true, // hasWinLossImages + true, // shortcutsVisibleForSkipButtons + new Color(169, 176, 190), // nimbusBlueGrey + new Color(214, 217, 223), // control + new Color(255, 255, 255), // nimbusLightBackground + new Color(242, 242, 189), // info + new Color(51, 98, 140), // nimbusBase + null, // mageToolbar new Color(200, 200, 180, 200), // playerPanel_inactiveBackgroundColor new Color(200, 255, 200, 200), // playerPanel_activeBackgroundColor - new Color(131, 94, 83, 200), // playerPanel_deadBackgroundColor - // card icons - new Color(169, 176, 190), - Color.black, - new Color(51, 98, 140), - Color.black + new Color(131, 94, 83, 200), // playerPanel_deadBackgroundColor + new Color(250, 250, 250, 150), // deckEditorToolbarBackgroundColor + new Color(169, 176, 190), // cardIconsFillColor + Color.black, // cardIconsStrokeColor + new Color(51, 98, 140), // cardIconsTextColor + Color.black // textColor ), GREY("Grey", "grey-theme/", @@ -55,6 +55,7 @@ public enum ThemeType { new Color(172, 172, 172, 200), // playerPanel_inactiveBackgroundColor new Color(180, 234, 180, 200), // playerPanel_activeBackgroundColor new Color(99, 99, 99, 200), // playerPanel_deadBackgroundColor + new Color(250, 250, 250, 150), // deckEditorToolbarBackgroundColor // card icons new Color(158, 158, 158), Color.black, @@ -79,6 +80,7 @@ public enum ThemeType { new Color(243, 233, 164), // playerPanel_inactiveBackgroundColor new Color(204, 236, 201), // playerPanel_activeBackgroundColor new Color(106, 0, 255), // playerPanel_deadBackgroundColor + new Color(250, 250, 250, 150), // deckEditorToolbarBackgroundColor // card icons new Color(246, 136, 158), Color.black, @@ -103,6 +105,7 @@ public enum ThemeType { new Color(219, 193, 172), // playerPanel_inactiveBackgroundColor new Color(204, 236, 201), // playerPanel_activeBackgroundColor new Color(99, 72, 50, 255), // playerPanel_deadBackgroundColor + new Color(250, 250, 250, 150), // deckEditorToolbarBackgroundColor // card icons new Color(219, 193, 172), Color.black, @@ -127,6 +130,7 @@ public enum ThemeType { new Color(172, 195, 219), // playerPanel_inactiveBackgroundColor new Color(204, 236, 201), // playerPanel_activeBackgroundColor new Color(50, 68, 99, 255), // playerPanel_deadBackgroundColor + new Color(250, 250, 250, 150), // deckEditorToolbarBackgroundColor // card icons new Color(172, 197, 219), Color.black, @@ -142,19 +146,20 @@ public enum ThemeType { true, true, true, - new Color(43, 45, 49), // buttons, scrollar background, disabled inputs - new Color(49, 51, 56), // window background - new Color(58, 56, 64), // inputs, table rows - new Color(58, 56, 64), // tooltips - new Color(25, 25, 25), // title bars, scrollbar foreground - new Color(43, 45, 49), // mageToolbar - new Color(43, 45, 49), // playerPanel_inactiveBackgroundColor - new Color(64, 61, 56), // playerPanel_activeBackgroundColor + new Color(43, 45, 49), // buttons, scrollar background, disabled inputs + new Color(49, 51, 56), // window background + new Color(58, 56, 64), // inputs, table rows + new Color(58, 56, 64), // tooltips + new Color(25, 25, 25), // title bars, scrollbar foreground + new Color(43, 45, 49), // mageToolbar + new Color(43, 45, 49), // playerPanel_inactiveBackgroundColor + new Color(64, 61, 56), // playerPanel_activeBackgroundColor new Color(50, 68, 99, 255), // playerPanel_deadBackgroundColor - new Color(172, 197, 219), - Color.BLACK, - new Color(0, 78, 97), - new Color(220, 220, 220) + new Color(50, 50, 50, 250), // deckEditorToolbarBackgroundColor + new Color(172, 197, 219), // cardIconsFillColor + Color.BLACK, // cardIconsStrokeColor + new Color(0, 78, 97), // cardIconsTextColor + new Color(220, 220, 220) // textColor ); private final String name; @@ -175,6 +180,7 @@ public enum ThemeType { private final Color playerPanel_inactiveBackgroundColor; private final Color playerPanel_activeBackgroundColor; private final Color playerPanel_deadBackgroundColor; + private final Color deckEditorToolbarBackgroundColor; // card icons settings (example: flying icon) private final Color cardIconsFillColor; private final Color cardIconsStrokeColor; @@ -201,6 +207,7 @@ public enum ThemeType { Color playerPanel_inactiveBackgroundColor, Color playerPanel_activeBackgroundColor, Color playerPanel_deadBackgroundColor, + Color deckEditorToolbarBackgroundColor, Color cardIconsFillColor, Color cardIconsStrokeColor, Color cardIconsTextColor, @@ -224,6 +231,7 @@ public enum ThemeType { this.playerPanel_activeBackgroundColor = playerPanel_activeBackgroundColor; this.playerPanel_deadBackgroundColor = playerPanel_deadBackgroundColor; this.playerPanel_inactiveBackgroundColor = playerPanel_inactiveBackgroundColor; + this.deckEditorToolbarBackgroundColor = deckEditorToolbarBackgroundColor; this.cardIconsFillColor = cardIconsFillColor; this.cardIconsStrokeColor = cardIconsStrokeColor; this.cardIconsTextColor = cardIconsTextColor; @@ -292,6 +300,10 @@ public Color getPlayerPanel_deadBackgroundColor() { return playerPanel_deadBackgroundColor; } + public Color getDeckEditorToolbarBackgroundColor() { + return deckEditorToolbarBackgroundColor; + } + private String getImagePath(String imageType, String name) { return "/" + imageType + "/" + path + name; }