From 03caff3afcc21e2fc21f3714359e824a251b5e45 Mon Sep 17 00:00:00 2001 From: Arthur Desk Date: Fri, 24 May 2019 18:52:46 +0300 Subject: [PATCH] fixed bugs with settings --- src/main/java/application/DisplayStyles.java | 8 ++++---- src/main/java/application/GUI.java | 2 ++ src/main/java/application/Settings.java | 1 - src/main/java/application/entities/SettingsData.java | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/java/application/DisplayStyles.java b/src/main/java/application/DisplayStyles.java index 64bb627..3b751ad 100644 --- a/src/main/java/application/DisplayStyles.java +++ b/src/main/java/application/DisplayStyles.java @@ -41,7 +41,7 @@ public class DisplayStyles { public static Color COLOR_ACTIVE; public static Color COLOR_BUS; - public static Color MAIN_TEXT_COLOR = Color.lightGray; + public static Color MAIN_TEXT_COLOR = Color.white; public static Color COLOR_INPUT_REGISTER_ACTIVE_BIT; @@ -228,13 +228,13 @@ public DisplayStyles() { COLOR_TITLE = new Color(157, 189, 165); COLOR_VALUE = new Color(255,0,77); // цвет активных foreground кнопок - COLOR_INPUT_TITLE = new Color(0,70,85); // цвет регистров - фон - COLOR_INPUT_BODY = new Color(25,88,102); // цвет содержимого регистров - фон + COLOR_INPUT_TITLE = new Color(Integer.valueOf("29434e", 16)); // цвет регистров - фон + COLOR_INPUT_BODY = new Color(Integer.valueOf("37464f", 16)); // цвет содержимого регистров - фон COLOR_ACTIVE_INPUT = new Color(192, 0, 0); // CUSTOM - COLOR_BACKGROUND_STYLE = new Color(30,39,45); + COLOR_BACKGROUND_STYLE = new Color(Integer.valueOf("62717b", 16)); // END CUSTOM diff --git a/src/main/java/application/GUI.java b/src/main/java/application/GUI.java index 4876044..1733555 100644 --- a/src/main/java/application/GUI.java +++ b/src/main/java/application/GUI.java @@ -66,6 +66,7 @@ public GUI(GUI pairgui) throws Exception { } public void init() { + CycleActionManager.setGui(this); this.cmanager = new ComponentManager(GUI.this); this.bcomp.startTimer(); @@ -176,6 +177,7 @@ public void windowDeactivated(WindowEvent e) { } @Override + public void windowClosed(WindowEvent e) { } diff --git a/src/main/java/application/Settings.java b/src/main/java/application/Settings.java index 25a3701..8687f50 100644 --- a/src/main/java/application/Settings.java +++ b/src/main/java/application/Settings.java @@ -149,6 +149,5 @@ public static Color getBackgroundColor() { public static void setBackgroundColor(Color backgroundColor) { Settings.backgroundColor = backgroundColor; - DisplayStyles.COLOR_BACKGROUND_STYLE = backgroundColor; } } diff --git a/src/main/java/application/entities/SettingsData.java b/src/main/java/application/entities/SettingsData.java index fa8bade..5b23095 100644 --- a/src/main/java/application/entities/SettingsData.java +++ b/src/main/java/application/entities/SettingsData.java @@ -65,7 +65,7 @@ public static SettingsData load(){ e.printStackTrace(); } } - return new SettingsData(); + return SettingsData.getDefault(); } public static SettingsData getDefault(){