Refined theme customization mechanism

* Created abstract SettingsPanel class for defining settings screen
pages
* Moves theme customization related settings to new class
ThemeCustomizationPanel
* Changes Theme to use a map internally
This commit is contained in:
2019-12-21 00:29:16 +01:00
parent c7959e5287
commit 10dd3635a5
7 changed files with 496 additions and 535 deletions

View File

@ -29,6 +29,7 @@ import envoy.client.LocalDB;
import envoy.client.Settings;
import envoy.client.event.EventBus;
import envoy.client.event.ThemeChangeEvent;
import envoy.client.ui.settings.SettingsScreen;
import envoy.client.util.EnvoyLog;
import envoy.schema.Message;
import envoy.schema.User;
@ -157,7 +158,6 @@ public class ChatWindow extends JFrame {
settingsButton.addActionListener((evt) -> {
try {
new SettingsScreen().setVisible(true);
changeChatWindowColors(Settings.getInstance().getThemes().get(Settings.getInstance().getCurrentTheme()));
} catch (Exception e) {
logger.log(Level.WARNING, "An error occured while opening the settings screen", e);
e.printStackTrace();