From c8752a6389d2e93109b44595bb6775500efc75e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Delgado?= Date: Tue, 2 Feb 2021 23:45:10 +0100 Subject: [PATCH] Color variables in settings file --- settings.xml | 3 +++ src/tm/ui/TMUI.java | 15 +++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/settings.xml b/settings.xml index 8335b68..8141421 100644 --- a/settings.xml +++ b/settings.xml @@ -6,4 +6,7 @@ + + + diff --git a/src/tm/ui/TMUI.java b/src/tm/ui/TMUI.java index 6827537..e8e8944 100644 --- a/src/tm/ui/TMUI.java +++ b/src/tm/ui/TMUI.java @@ -282,6 +282,9 @@ public class TMUI extends JFrame { private boolean viewToolBar=true; private String lastPath = ""; + public static Color MenuBG = Color.decode("#151b1c"); + public static Color WindowBG = Color.decode("#222b2e"); + public static Color AsideBG = Color.decode("#2d383b"); /** @@ -676,6 +679,9 @@ public class TMUI extends JFrame { sb.append(makePropertyTag("recentFile", recentFile.getAbsolutePath())); } sb.append(makePropertyTag("lastPath", lastPath)); + sb.append(makePropertyTag("MenuBG", "#"+Integer.toHexString(MenuBG.getRGB()).substring(2))); + sb.append(makePropertyTag("WindowBG", "#"+Integer.toHexString(WindowBG.getRGB()).substring(2))); + sb.append(makePropertyTag("AsideBG", "#"+Integer.toHexString(AsideBG.getRGB()).substring(2))); sb.append("\n"); @@ -755,6 +761,15 @@ public class TMUI extends JFrame { } else if (key.equals("lastPath")) { lastPath = value; + } + else if (key.equals("MenuBG")) { + MenuBG = Color.decode(value); + } + else if (key.equals("WindowBG")) { + WindowBG = Color.decode(value); + } + else if (key.equals("AsideBG")) { + AsideBG = Color.decode(value); } } }