From 0a26fe2ed198749201307e0038106ae6883f9319 Mon Sep 17 00:00:00 2001 From: Ilya Filisteev Date: Fri, 9 Feb 2018 00:21:16 +0300 Subject: [PATCH 1/3] new colour scheme dracul(dark) added and description typo fix --- src/chatty/Chatty.java | 2 +- .../gui/components/settings/ColorSettings.java | 17 +++++++++++++++++ src/chatty/lang/Strings.properties | 1 + 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/chatty/Chatty.java b/src/chatty/Chatty.java index 86d05386a..e35f486b8 100644 --- a/src/chatty/Chatty.java +++ b/src/chatty/Chatty.java @@ -50,7 +50,7 @@ public class Chatty { public static final String REDIRECT_URI = "http://127.0.0.1:61324/token/"; /** - * Version number of this version of Chatty, consisting of numbers seperated + * Version number of this version of Chatty, consisting of numbers separated * by points. May contain a single "b" for beta versions, which are counted * as older (so 0.8.7b4 is older than 0.8.7). */ diff --git a/src/chatty/gui/components/settings/ColorSettings.java b/src/chatty/gui/components/settings/ColorSettings.java index ec0004e4c..0deb5c35d 100644 --- a/src/chatty/gui/components/settings/ColorSettings.java +++ b/src/chatty/gui/components/settings/ColorSettings.java @@ -74,6 +74,10 @@ public ColorSettings(SettingsDialog d, Settings settings) { "Black", "White", "#FF9900", "#FFCC00", "#66FF66", "#FFFFFF", "#000000", "#333333", "#555555"); + presets.addPreset(Language.getString("settings.colorPresets.option.dracul"), + "#2B2B2B", "#629755", "#9876AA", "#A0A0A0", "#BC3F3C", + "#2B2B2B", "#A9B7C6", "#155221", "#294436"); + presets.init(); gbc = d.makeGbc(0, 0, 1, 1); @@ -229,6 +233,19 @@ private void initPresets() { darkColors2.put("searchResultColor2", "#555555"); presets.put("dark2", darkColors2); + + Map dracul = new HashMap<>(); + dracul.put("backgroundColor", "#2B2B2B"); + dracul.put("foregroundColor", "#629755"); + dracul.put("infoColor", "#9876AA"); + dracul.put("compactColor", "#A0A0A0"); + dracul.put("highlightColor", "#BC3F3C"); + dracul.put("inputBackgroundColor", "#2B2B2B"); + dracul.put("inputForegroundColor", "#A9B7C6"); + dracul.put("searchResultColor", "#155221"); + dracul.put("searchResultColor2", "#294436"); + + presets.put("dracul", dracul); } } diff --git a/src/chatty/lang/Strings.properties b/src/chatty/lang/Strings.properties index 634c45fe3..affbc9f57 100644 --- a/src/chatty/lang/Strings.properties +++ b/src/chatty/lang/Strings.properties @@ -457,6 +457,7 @@ settings.colorPresets.colorPresets = Color Presets settings.colorPresets.option.default = Default settings.colorPresets.option.dark = Dark settings.colorPresets.option.dark2 = Dark 2 +settings.colorPresets.option.dracul = Dracul (dark) settings.colorPresets.button.save = Save settings.colorPresets.button.saveAs = Save as.. settings.colorPresets.button.delete = Delete From cecd83e7371c97e083988b299b102e5288e76bc5 Mon Sep 17 00:00:00 2001 From: Ilya Filisteev Date: Fri, 9 Feb 2018 00:21:16 +0300 Subject: [PATCH 2/3] new colour scheme dracul(dark) added and description typo fix --- .../components/settings/ColorSettings.java | 66 +++++++++++-------- src/chatty/lang/Strings.properties | 1 + 2 files changed, 41 insertions(+), 26 deletions(-) diff --git a/src/chatty/gui/components/settings/ColorSettings.java b/src/chatty/gui/components/settings/ColorSettings.java index 2177ca6b9..2671da878 100644 --- a/src/chatty/gui/components/settings/ColorSettings.java +++ b/src/chatty/gui/components/settings/ColorSettings.java @@ -38,7 +38,7 @@ public ColorSettings(SettingsDialog d, Settings settings) { colorsPanel = new JPanel(new GridBagLayout()); GridBagConstraints gbc; - + //---------------------------------------------- // Color settings that require special handling //---------------------------------------------- @@ -48,14 +48,14 @@ public ColorSettings(SettingsDialog d, Settings settings) { "foregroundColor", Language.getString("settings.colors.background"), 0, 0); - + ColorSetting backgroundColor2 = addColorSetting( "backgroundColor2", ColorSetting.BACKGROUND, "foregroundColor", Language.getString("settings.colors.background2"), 1, 0); - + ColorSetting separatorColor = addColorSetting( "separatorColor", ColorSetting.FOREGROUND, @@ -70,14 +70,14 @@ public ColorSettings(SettingsDialog d, Settings settings) { Language.getString("settings.colors.highlightBackground"), 11, 0); highlightBackgroundColor.setEnabled(false); - + ColorSetting highlightColor = addColorSetting( "highlightColor", ColorSetting.FOREGROUND, "backgroundColor", Language.getString("settings.colors.highlight"), 11, 1); - + ColorSetting timestampColor = addColorSetting( "timestampColor", ColorSetting.FOREGROUND, @@ -85,7 +85,7 @@ public ColorSettings(SettingsDialog d, Settings settings) { Language.getString("settings.colors.timestamp"), 8, 0); switchOnHover(highlightBackgroundColor, "backgroundColor", "highlightBackgroundColor", "highlightBackground", timestampColor); - + Map timestampInheritOptions = new LinkedHashMap<>(); timestampInheritOptions.put("off", "Off"); for (int i=10;i<=100;i+=10) { @@ -93,7 +93,7 @@ public ColorSettings(SettingsDialog d, Settings settings) { } ComboStringSetting timestampInheritSelection = new ComboStringSetting(timestampInheritOptions); d.addStringSetting("timestampColorInherit", timestampInheritSelection); - + //------------------------------------------------ // Boolean settings that require special handling //------------------------------------------------ @@ -238,7 +238,7 @@ public ColorSettings(SettingsDialog d, Settings settings) { false, // highlightBackground false, // timestampColorEnabled }); - + presets.addPreset("Twitch", new String[]{ "#EFEEF1", // backgroundColor @@ -262,7 +262,7 @@ public ColorSettings(SettingsDialog d, Settings settings) { true, // highlightBackground true, // timestampColorEnabled }); - + presets.addPreset("Twitch Dark", new String[]{ "#17141A", // backgroundColor @@ -279,14 +279,14 @@ public ColorSettings(SettingsDialog d, Settings settings) { "#7A4B00", // separatorColor "#898395", // timestampColor "70", // timestampColorInherit - }, + }, new Boolean[]{ true, // alternateBackground false, // messageSeparator true, // highlightBackground true, // timestampColorEnabled }); - + presets.addPreset("Theater", new String[]{ "#0E0C13", // backgroundColor @@ -303,14 +303,14 @@ public ColorSettings(SettingsDialog d, Settings settings) { "#2D2D2D", // separatorColor "#898395", // timestampColor "100", // timestampColorInherit - }, + }, new Boolean[]{ false, // alternateBackground false, // messageSeparator false, // highlightBackground true, // timestampColorEnabled }); - + presets.addPreset("Dark Smooth", new String[]{ "#323232", // backgroundColor @@ -334,13 +334,27 @@ public ColorSettings(SettingsDialog d, Settings settings) { true, // highlightBackground true, // timestampColorEnabled }); - + + presets.addPreset("Dark (dracul)", + new String[]{"#2B2B2B", + "#629755", + "#9876AA", + "#A0A0A0", + "#BC3F3C", + "#2B2B2B", + "#A9B7C6", + "#155221", + "#294436", + }, new Boolean[]{ + true, false, true, true, + }); + presets.init(); //======== // Layout //======== - + //------------------ // Boolean Settings //------------------ @@ -350,14 +364,14 @@ public ColorSettings(SettingsDialog d, Settings settings) { gbc.insets = new Insets(-1,10,0,0); SettingsUtil.addSubsettings(alternateBackground, backgroundColor2); colorsPanel.add(alternateBackground, gbc); - + // Message Separator boolean setting gbc = d.makeGbc(0, 4, 2, 1); gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(-1,10,0,0); SettingsUtil.addSubsettings(messageSeparator, separatorColor); colorsPanel.add(messageSeparator, gbc); - + // Highlight Background boolean setting gbc = d.makeGbc(0, 12, 2, 1); gbc.anchor = GridBagConstraints.WEST; @@ -373,19 +387,19 @@ public ColorSettings(SettingsDialog d, Settings settings) { highlightBackgroundColor.setEnabled(highlightBackground.isSelected()); }); colorsPanel.add(highlightBackground, gbc); - + // Timestamp boolean setting gbc = d.makeGbc(0, 9, 2, 1); gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(-1,10,0,0); SettingsUtil.addSubsettings(timestampColorEnabled, timestampColor, timestampInheritSelection); colorsPanel.add(timestampColorEnabled, gbc); - + gbc = d.makeGbc(1, 9, 2, 1); gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(-1,10,0,0); colorsPanel.add(d.createPanel("timestampColorInherit", timestampInheritSelection), gbc); - + //-------------------------- // Background Switch Button //-------------------------- @@ -405,11 +419,11 @@ public ColorSettings(SettingsDialog d, Settings settings) { gbc = d.makeGbc(0, 5, 2, 1); gbc.insets = new Insets(10, 0, 2, 0); colorsPanel.add(new JLabel(Language.getString("settings.colors.heading.misc")), gbc); - + gbc = d.makeGbc(0, 10, 2, 1); gbc.insets = new Insets(10, 0, 2, 0); colorsPanel.add(new JLabel(Language.getString("settings.colors.heading.highlights")), gbc); - + gbc = d.makeGbc(0, 13, 2, 1); gbc.insets = new Insets(10, 0, 2, 0); colorsPanel.add(new JLabel(Language.getString("settings.colors.heading.searchResult")), gbc); @@ -419,7 +433,7 @@ public ColorSettings(SettingsDialog d, Settings settings) { //------------ gbc = d.makeGbc(0, 0, 1, 1); mainPanel.add(presets, gbc); - + gbc = d.makeGbc(0, 1, 1, 1); gbc.fill = GridBagConstraints.HORIZONTAL; gbc.weightx = 1; @@ -472,7 +486,7 @@ private void updated(String setting) { /** * Switch the base color of the given settings to tempSetting if the mouse * is hovered over hoverSetting. - * + * * @param hoverSetting Setting to hover over * @param normalSetting Name of the default color setting * @param tempSetting Name of the color setting to switch to on hover @@ -503,7 +517,7 @@ public void mouseExited(MouseEvent e) { }); } - + /** * Listen for a color setting to be updated. Save the setting name so it's * clear which setting it was. @@ -522,5 +536,5 @@ public void colorUpdated() { } } - + } diff --git a/src/chatty/lang/Strings.properties b/src/chatty/lang/Strings.properties index fadfa0db9..ef41944c3 100644 --- a/src/chatty/lang/Strings.properties +++ b/src/chatty/lang/Strings.properties @@ -724,6 +724,7 @@ settings.colorPresets.colorPresets = Color Presets settings.colorPresets.option.default = Default settings.colorPresets.option.dark = Dark settings.colorPresets.option.dark2 = Dark 2 +settings.colorPresets.option.dracul = Dracul (dark) settings.colorPresets.button.save = Save settings.colorPresets.button.saveAs = Save as.. settings.colorPresets.button.delete = Delete From 27e5e9a22e806e0e637f3a824b14449513dbc501 Mon Sep 17 00:00:00 2001 From: Ilya Filisteev Date: Mon, 18 May 2020 00:45:35 +0300 Subject: [PATCH 3/3] add dracul theme --- .../components/settings/ColorSettings.java | 84 +++++++++++-------- 1 file changed, 47 insertions(+), 37 deletions(-) diff --git a/src/chatty/gui/components/settings/ColorSettings.java b/src/chatty/gui/components/settings/ColorSettings.java index 2671da878..a1f221a98 100644 --- a/src/chatty/gui/components/settings/ColorSettings.java +++ b/src/chatty/gui/components/settings/ColorSettings.java @@ -38,7 +38,7 @@ public ColorSettings(SettingsDialog d, Settings settings) { colorsPanel = new JPanel(new GridBagLayout()); GridBagConstraints gbc; - + //---------------------------------------------- // Color settings that require special handling //---------------------------------------------- @@ -48,14 +48,14 @@ public ColorSettings(SettingsDialog d, Settings settings) { "foregroundColor", Language.getString("settings.colors.background"), 0, 0); - + ColorSetting backgroundColor2 = addColorSetting( "backgroundColor2", ColorSetting.BACKGROUND, "foregroundColor", Language.getString("settings.colors.background2"), 1, 0); - + ColorSetting separatorColor = addColorSetting( "separatorColor", ColorSetting.FOREGROUND, @@ -70,14 +70,14 @@ public ColorSettings(SettingsDialog d, Settings settings) { Language.getString("settings.colors.highlightBackground"), 11, 0); highlightBackgroundColor.setEnabled(false); - + ColorSetting highlightColor = addColorSetting( "highlightColor", ColorSetting.FOREGROUND, "backgroundColor", Language.getString("settings.colors.highlight"), 11, 1); - + ColorSetting timestampColor = addColorSetting( "timestampColor", ColorSetting.FOREGROUND, @@ -85,7 +85,7 @@ public ColorSettings(SettingsDialog d, Settings settings) { Language.getString("settings.colors.timestamp"), 8, 0); switchOnHover(highlightBackgroundColor, "backgroundColor", "highlightBackgroundColor", "highlightBackground", timestampColor); - + Map timestampInheritOptions = new LinkedHashMap<>(); timestampInheritOptions.put("off", "Off"); for (int i=10;i<=100;i+=10) { @@ -93,7 +93,7 @@ public ColorSettings(SettingsDialog d, Settings settings) { } ComboStringSetting timestampInheritSelection = new ComboStringSetting(timestampInheritOptions); d.addStringSetting("timestampColorInherit", timestampInheritSelection); - + //------------------------------------------------ // Boolean settings that require special handling //------------------------------------------------ @@ -238,7 +238,7 @@ public ColorSettings(SettingsDialog d, Settings settings) { false, // highlightBackground false, // timestampColorEnabled }); - + presets.addPreset("Twitch", new String[]{ "#EFEEF1", // backgroundColor @@ -262,7 +262,7 @@ public ColorSettings(SettingsDialog d, Settings settings) { true, // highlightBackground true, // timestampColorEnabled }); - + presets.addPreset("Twitch Dark", new String[]{ "#17141A", // backgroundColor @@ -279,14 +279,14 @@ public ColorSettings(SettingsDialog d, Settings settings) { "#7A4B00", // separatorColor "#898395", // timestampColor "70", // timestampColorInherit - }, + }, new Boolean[]{ true, // alternateBackground false, // messageSeparator true, // highlightBackground true, // timestampColorEnabled }); - + presets.addPreset("Theater", new String[]{ "#0E0C13", // backgroundColor @@ -303,14 +303,14 @@ public ColorSettings(SettingsDialog d, Settings settings) { "#2D2D2D", // separatorColor "#898395", // timestampColor "100", // timestampColorInherit - }, + }, new Boolean[]{ false, // alternateBackground false, // messageSeparator false, // highlightBackground true, // timestampColorEnabled }); - + presets.addPreset("Dark Smooth", new String[]{ "#323232", // backgroundColor @@ -335,18 +335,28 @@ public ColorSettings(SettingsDialog d, Settings settings) { true, // timestampColorEnabled }); - presets.addPreset("Dark (dracul)", - new String[]{"#2B2B2B", - "#629755", - "#9876AA", - "#A0A0A0", - "#BC3F3C", - "#2B2B2B", - "#A9B7C6", - "#155221", - "#294436", - }, new Boolean[]{ - true, false, true, true, + presets.addPreset("Dark Dracul", + new String[]{ + "#2B2B2B",// backgroundColor + "#629755",// foregroundColor + "#9876AA",// infoColor + "#A0A0A0",// compactColor + "#BC3F3C", // highlightColor + "#2B2B2B",// inputBackgroundColor + "#A9B7C6", // inputForegroundColor + "#155221", // searchResultColor + "#294436", // searchResultColor2 + "#3B3B3B", // backgroundColor2 + "#5C0000", // highlightBackgroundColor + "#DFDFDF", // separatorColor + "#C5C5C5", // timestampColor + "40", // timestampColorInherit + }, + new Boolean[]{ + true, // alternateBackground + false, // messageSeparator + true, // highlightBackground + true, // timestampColorEnabled }); presets.init(); @@ -354,7 +364,7 @@ public ColorSettings(SettingsDialog d, Settings settings) { //======== // Layout //======== - + //------------------ // Boolean Settings //------------------ @@ -364,14 +374,14 @@ public ColorSettings(SettingsDialog d, Settings settings) { gbc.insets = new Insets(-1,10,0,0); SettingsUtil.addSubsettings(alternateBackground, backgroundColor2); colorsPanel.add(alternateBackground, gbc); - + // Message Separator boolean setting gbc = d.makeGbc(0, 4, 2, 1); gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(-1,10,0,0); SettingsUtil.addSubsettings(messageSeparator, separatorColor); colorsPanel.add(messageSeparator, gbc); - + // Highlight Background boolean setting gbc = d.makeGbc(0, 12, 2, 1); gbc.anchor = GridBagConstraints.WEST; @@ -387,19 +397,19 @@ public ColorSettings(SettingsDialog d, Settings settings) { highlightBackgroundColor.setEnabled(highlightBackground.isSelected()); }); colorsPanel.add(highlightBackground, gbc); - + // Timestamp boolean setting gbc = d.makeGbc(0, 9, 2, 1); gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(-1,10,0,0); SettingsUtil.addSubsettings(timestampColorEnabled, timestampColor, timestampInheritSelection); colorsPanel.add(timestampColorEnabled, gbc); - + gbc = d.makeGbc(1, 9, 2, 1); gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(-1,10,0,0); colorsPanel.add(d.createPanel("timestampColorInherit", timestampInheritSelection), gbc); - + //-------------------------- // Background Switch Button //-------------------------- @@ -419,11 +429,11 @@ public ColorSettings(SettingsDialog d, Settings settings) { gbc = d.makeGbc(0, 5, 2, 1); gbc.insets = new Insets(10, 0, 2, 0); colorsPanel.add(new JLabel(Language.getString("settings.colors.heading.misc")), gbc); - + gbc = d.makeGbc(0, 10, 2, 1); gbc.insets = new Insets(10, 0, 2, 0); colorsPanel.add(new JLabel(Language.getString("settings.colors.heading.highlights")), gbc); - + gbc = d.makeGbc(0, 13, 2, 1); gbc.insets = new Insets(10, 0, 2, 0); colorsPanel.add(new JLabel(Language.getString("settings.colors.heading.searchResult")), gbc); @@ -433,7 +443,7 @@ public ColorSettings(SettingsDialog d, Settings settings) { //------------ gbc = d.makeGbc(0, 0, 1, 1); mainPanel.add(presets, gbc); - + gbc = d.makeGbc(0, 1, 1, 1); gbc.fill = GridBagConstraints.HORIZONTAL; gbc.weightx = 1; @@ -486,7 +496,7 @@ private void updated(String setting) { /** * Switch the base color of the given settings to tempSetting if the mouse * is hovered over hoverSetting. - * + * * @param hoverSetting Setting to hover over * @param normalSetting Name of the default color setting * @param tempSetting Name of the color setting to switch to on hover @@ -517,7 +527,7 @@ public void mouseExited(MouseEvent e) { }); } - + /** * Listen for a color setting to be updated. Save the setting name so it's * clear which setting it was. @@ -536,5 +546,5 @@ public void colorUpdated() { } } - + }