From e48d5242b5b7d08e3e6ebc757e2de9e8ddf6cdd2 Mon Sep 17 00:00:00 2001 From: Alex Spataru Date: Thu, 19 Sep 2024 16:51:27 -0500 Subject: [PATCH] Add a lot of themes --- app/qml/Dialogs/About.qml | 20 ++- app/qml/Dialogs/Acknowledgements.qml | 20 ++- app/qml/Dialogs/CsvPlayer.qml | 20 ++- app/qml/Dialogs/Donate.qml | 20 ++- app/qml/Dialogs/ExternalConsole.qml | 20 ++- app/qml/Dialogs/MQTTConfiguration.qml | 20 ++- app/qml/MainWindow/Dashboard/ViewOptions.qml | 21 ++- app/qml/MainWindow/Panes/Console.qml | 21 ++- app/qml/MainWindow/Panes/Setup.qml | 21 ++- app/qml/MainWindow/Root.qml | 17 +- app/qml/ProjectEditor/Root.qml | 20 ++- app/qml/ProjectEditor/Views/DatasetView.qml | 17 +- .../ProjectEditor/Views/FrameParserView.qml | 17 +- app/qml/ProjectEditor/Views/GroupView.qml | 17 +- app/qml/Widgets/BigButton.qml | 14 +- app/rcc/rcc.qrc | 8 +- app/rcc/themes/Breeze Dark.json | 166 ++++++++++-------- app/rcc/themes/Breeze Light.json | 18 +- .../{Breeze Classic.json => Default.json} | 20 ++- app/rcc/themes/Outdoor Day.json | 101 +++++++++++ app/rcc/themes/Outdoor Night.json | 101 +++++++++++ app/rcc/themes/Yaru Dark.json | 101 +++++++++++ app/rcc/themes/Yaru Light.json | 101 +++++++++++ app/rcc/themes/macOS Dark.json | 101 +++++++++++ app/rcc/themes/macOS Light.json | 101 +++++++++++ app/src/Misc/ThemeManager.cpp | 53 +++++- app/src/Misc/ThemeManager.h | 4 +- 27 files changed, 1007 insertions(+), 153 deletions(-) rename app/rcc/themes/{Breeze Classic.json => Default.json} (86%) create mode 100644 app/rcc/themes/Outdoor Day.json create mode 100644 app/rcc/themes/Outdoor Night.json create mode 100644 app/rcc/themes/Yaru Dark.json create mode 100644 app/rcc/themes/Yaru Light.json create mode 100644 app/rcc/themes/macOS Dark.json create mode 100644 app/rcc/themes/macOS Light.json diff --git a/app/qml/Dialogs/About.qml b/app/qml/Dialogs/About.qml index 64f67b8b..65f75931 100644 --- a/app/qml/Dialogs/About.qml +++ b/app/qml/Dialogs/About.qml @@ -65,13 +65,25 @@ Window { // Page { anchors.fill: parent - palette.base: Cpp_ThemeManager.colors["base"] + palette.mid: Cpp_ThemeManager.colors["mid"] + palette.dark: Cpp_ThemeManager.colors["dark"] palette.text: Cpp_ThemeManager.colors["text"] - palette.button: Cpp_ThemeManager.colors["button"] + palette.base: Cpp_ThemeManager.colors["base"] + palette.link: Cpp_ThemeManager.colors["link"] + palette.light: Cpp_ThemeManager.colors["light"] palette.window: Cpp_ThemeManager.colors["window"] - palette.windowText: Cpp_ThemeManager.colors["text"] + palette.shadow: Cpp_ThemeManager.colors["shadow"] + palette.accent: Cpp_ThemeManager.colors["accent"] + palette.button: Cpp_ThemeManager.colors["button"] + palette.midlight: Cpp_ThemeManager.colors["midlight"] + palette.highlight: Cpp_ThemeManager.colors["highlight"] + palette.windowText: Cpp_ThemeManager.colors["window_text"] + palette.brightText: Cpp_ThemeManager.colors["bright_text"] palette.buttonText: Cpp_ThemeManager.colors["button_text"] - palette.highlight: Cpp_ThemeManager.colors["switch_highlight"] + palette.toolTipBase: Cpp_ThemeManager.colors["tooltip_base"] + palette.toolTipText: Cpp_ThemeManager.colors["tooltip_text"] + palette.linkVisited: Cpp_ThemeManager.colors["link_visited"] + palette.alternateBase: Cpp_ThemeManager.colors["alternate_base"] palette.placeholderText: Cpp_ThemeManager.colors["placeholder_text"] palette.highlightedText: Cpp_ThemeManager.colors["highlighted_text"] diff --git a/app/qml/Dialogs/Acknowledgements.qml b/app/qml/Dialogs/Acknowledgements.qml index 5b3aff74..c5e5af50 100644 --- a/app/qml/Dialogs/Acknowledgements.qml +++ b/app/qml/Dialogs/Acknowledgements.qml @@ -60,13 +60,25 @@ Window { // Page { anchors.fill: parent - palette.base: Cpp_ThemeManager.colors["base"] + palette.mid: Cpp_ThemeManager.colors["mid"] + palette.dark: Cpp_ThemeManager.colors["dark"] palette.text: Cpp_ThemeManager.colors["text"] - palette.button: Cpp_ThemeManager.colors["button"] + palette.base: Cpp_ThemeManager.colors["base"] + palette.link: Cpp_ThemeManager.colors["link"] + palette.light: Cpp_ThemeManager.colors["light"] palette.window: Cpp_ThemeManager.colors["window"] - palette.windowText: Cpp_ThemeManager.colors["text"] + palette.shadow: Cpp_ThemeManager.colors["shadow"] + palette.accent: Cpp_ThemeManager.colors["accent"] + palette.button: Cpp_ThemeManager.colors["button"] + palette.midlight: Cpp_ThemeManager.colors["midlight"] + palette.highlight: Cpp_ThemeManager.colors["highlight"] + palette.windowText: Cpp_ThemeManager.colors["window_text"] + palette.brightText: Cpp_ThemeManager.colors["bright_text"] palette.buttonText: Cpp_ThemeManager.colors["button_text"] - palette.highlight: Cpp_ThemeManager.colors["switch_highlight"] + palette.toolTipBase: Cpp_ThemeManager.colors["tooltip_base"] + palette.toolTipText: Cpp_ThemeManager.colors["tooltip_text"] + palette.linkVisited: Cpp_ThemeManager.colors["link_visited"] + palette.alternateBase: Cpp_ThemeManager.colors["alternate_base"] palette.placeholderText: Cpp_ThemeManager.colors["placeholder_text"] palette.highlightedText: Cpp_ThemeManager.colors["highlighted_text"] diff --git a/app/qml/Dialogs/CsvPlayer.qml b/app/qml/Dialogs/CsvPlayer.qml index 28e069a2..91beb44a 100644 --- a/app/qml/Dialogs/CsvPlayer.qml +++ b/app/qml/Dialogs/CsvPlayer.qml @@ -81,13 +81,25 @@ Window { // Page { anchors.fill: parent - palette.base: Cpp_ThemeManager.colors["base"] + palette.mid: Cpp_ThemeManager.colors["mid"] + palette.dark: Cpp_ThemeManager.colors["dark"] palette.text: Cpp_ThemeManager.colors["text"] - palette.button: Cpp_ThemeManager.colors["button"] + palette.base: Cpp_ThemeManager.colors["base"] + palette.link: Cpp_ThemeManager.colors["link"] + palette.light: Cpp_ThemeManager.colors["light"] palette.window: Cpp_ThemeManager.colors["window"] - palette.windowText: Cpp_ThemeManager.colors["text"] + palette.shadow: Cpp_ThemeManager.colors["shadow"] + palette.accent: Cpp_ThemeManager.colors["accent"] + palette.button: Cpp_ThemeManager.colors["button"] + palette.midlight: Cpp_ThemeManager.colors["midlight"] + palette.highlight: Cpp_ThemeManager.colors["highlight"] + palette.windowText: Cpp_ThemeManager.colors["window_text"] + palette.brightText: Cpp_ThemeManager.colors["bright_text"] palette.buttonText: Cpp_ThemeManager.colors["button_text"] - palette.highlight: Cpp_ThemeManager.colors["switch_highlight"] + palette.toolTipBase: Cpp_ThemeManager.colors["tooltip_base"] + palette.toolTipText: Cpp_ThemeManager.colors["tooltip_text"] + palette.linkVisited: Cpp_ThemeManager.colors["link_visited"] + palette.alternateBase: Cpp_ThemeManager.colors["alternate_base"] palette.placeholderText: Cpp_ThemeManager.colors["placeholder_text"] palette.highlightedText: Cpp_ThemeManager.colors["highlighted_text"] diff --git a/app/qml/Dialogs/Donate.qml b/app/qml/Dialogs/Donate.qml index 9eb227b3..7c7ab965 100644 --- a/app/qml/Dialogs/Donate.qml +++ b/app/qml/Dialogs/Donate.qml @@ -99,13 +99,25 @@ Window { // Page { anchors.fill: parent - palette.base: Cpp_ThemeManager.colors["base"] + palette.mid: Cpp_ThemeManager.colors["mid"] + palette.dark: Cpp_ThemeManager.colors["dark"] palette.text: Cpp_ThemeManager.colors["text"] - palette.button: Cpp_ThemeManager.colors["button"] + palette.base: Cpp_ThemeManager.colors["base"] + palette.link: Cpp_ThemeManager.colors["link"] + palette.light: Cpp_ThemeManager.colors["light"] palette.window: Cpp_ThemeManager.colors["window"] - palette.windowText: Cpp_ThemeManager.colors["text"] + palette.shadow: Cpp_ThemeManager.colors["shadow"] + palette.accent: Cpp_ThemeManager.colors["accent"] + palette.button: Cpp_ThemeManager.colors["button"] + palette.midlight: Cpp_ThemeManager.colors["midlight"] + palette.highlight: Cpp_ThemeManager.colors["highlight"] + palette.windowText: Cpp_ThemeManager.colors["window_text"] + palette.brightText: Cpp_ThemeManager.colors["bright_text"] palette.buttonText: Cpp_ThemeManager.colors["button_text"] - palette.highlight: Cpp_ThemeManager.colors["switch_highlight"] + palette.toolTipBase: Cpp_ThemeManager.colors["tooltip_base"] + palette.toolTipText: Cpp_ThemeManager.colors["tooltip_text"] + palette.linkVisited: Cpp_ThemeManager.colors["link_visited"] + palette.alternateBase: Cpp_ThemeManager.colors["alternate_base"] palette.placeholderText: Cpp_ThemeManager.colors["placeholder_text"] palette.highlightedText: Cpp_ThemeManager.colors["highlighted_text"] diff --git a/app/qml/Dialogs/ExternalConsole.qml b/app/qml/Dialogs/ExternalConsole.qml index d37dacc1..8de9c102 100644 --- a/app/qml/Dialogs/ExternalConsole.qml +++ b/app/qml/Dialogs/ExternalConsole.qml @@ -67,13 +67,25 @@ Window { // Page { anchors.fill: parent - palette.base: Cpp_ThemeManager.colors["base"] + palette.mid: Cpp_ThemeManager.colors["mid"] + palette.dark: Cpp_ThemeManager.colors["dark"] palette.text: Cpp_ThemeManager.colors["text"] - palette.button: Cpp_ThemeManager.colors["button"] + palette.base: Cpp_ThemeManager.colors["base"] + palette.link: Cpp_ThemeManager.colors["link"] + palette.light: Cpp_ThemeManager.colors["light"] palette.window: Cpp_ThemeManager.colors["window"] - palette.windowText: Cpp_ThemeManager.colors["text"] + palette.shadow: Cpp_ThemeManager.colors["shadow"] + palette.accent: Cpp_ThemeManager.colors["accent"] + palette.button: Cpp_ThemeManager.colors["button"] + palette.midlight: Cpp_ThemeManager.colors["midlight"] + palette.highlight: Cpp_ThemeManager.colors["highlight"] + palette.windowText: Cpp_ThemeManager.colors["window_text"] + palette.brightText: Cpp_ThemeManager.colors["bright_text"] palette.buttonText: Cpp_ThemeManager.colors["button_text"] - palette.highlight: Cpp_ThemeManager.colors["switch_highlight"] + palette.toolTipBase: Cpp_ThemeManager.colors["tooltip_base"] + palette.toolTipText: Cpp_ThemeManager.colors["tooltip_text"] + palette.linkVisited: Cpp_ThemeManager.colors["link_visited"] + palette.alternateBase: Cpp_ThemeManager.colors["alternate_base"] palette.placeholderText: Cpp_ThemeManager.colors["placeholder_text"] palette.highlightedText: Cpp_ThemeManager.colors["highlighted_text"] diff --git a/app/qml/Dialogs/MQTTConfiguration.qml b/app/qml/Dialogs/MQTTConfiguration.qml index 4550f5ae..c3086699 100644 --- a/app/qml/Dialogs/MQTTConfiguration.qml +++ b/app/qml/Dialogs/MQTTConfiguration.qml @@ -85,13 +85,25 @@ Window { // Page { anchors.fill: parent - palette.base: Cpp_ThemeManager.colors["base"] + palette.mid: Cpp_ThemeManager.colors["mid"] + palette.dark: Cpp_ThemeManager.colors["dark"] palette.text: Cpp_ThemeManager.colors["text"] - palette.button: Cpp_ThemeManager.colors["button"] + palette.base: Cpp_ThemeManager.colors["base"] + palette.link: Cpp_ThemeManager.colors["link"] + palette.light: Cpp_ThemeManager.colors["light"] palette.window: Cpp_ThemeManager.colors["window"] - palette.windowText: Cpp_ThemeManager.colors["text"] + palette.shadow: Cpp_ThemeManager.colors["shadow"] + palette.accent: Cpp_ThemeManager.colors["accent"] + palette.button: Cpp_ThemeManager.colors["button"] + palette.midlight: Cpp_ThemeManager.colors["midlight"] + palette.highlight: Cpp_ThemeManager.colors["highlight"] + palette.windowText: Cpp_ThemeManager.colors["window_text"] + palette.brightText: Cpp_ThemeManager.colors["bright_text"] palette.buttonText: Cpp_ThemeManager.colors["button_text"] - palette.highlight: Cpp_ThemeManager.colors["switch_highlight"] + palette.toolTipBase: Cpp_ThemeManager.colors["tooltip_base"] + palette.toolTipText: Cpp_ThemeManager.colors["tooltip_text"] + palette.linkVisited: Cpp_ThemeManager.colors["link_visited"] + palette.alternateBase: Cpp_ThemeManager.colors["alternate_base"] palette.placeholderText: Cpp_ThemeManager.colors["placeholder_text"] palette.highlightedText: Cpp_ThemeManager.colors["highlighted_text"] diff --git a/app/qml/MainWindow/Dashboard/ViewOptions.qml b/app/qml/MainWindow/Dashboard/ViewOptions.qml index 6249aad2..4a75b8b5 100644 --- a/app/qml/MainWindow/Dashboard/ViewOptions.qml +++ b/app/qml/MainWindow/Dashboard/ViewOptions.qml @@ -86,13 +86,26 @@ Widgets.Pane { anchors.leftMargin: -9 anchors.rightMargin: -9 anchors.bottomMargin: -9 - palette.base: Cpp_ThemeManager.colors["base"] + + palette.mid: Cpp_ThemeManager.colors["mid"] + palette.dark: Cpp_ThemeManager.colors["dark"] palette.text: Cpp_ThemeManager.colors["text"] - palette.button: Cpp_ThemeManager.colors["button"] + palette.base: Cpp_ThemeManager.colors["base"] + palette.link: Cpp_ThemeManager.colors["link"] + palette.light: Cpp_ThemeManager.colors["light"] palette.window: Cpp_ThemeManager.colors["window"] - palette.windowText: Cpp_ThemeManager.colors["text"] + palette.shadow: Cpp_ThemeManager.colors["shadow"] + palette.accent: Cpp_ThemeManager.colors["accent"] + palette.button: Cpp_ThemeManager.colors["button"] + palette.midlight: Cpp_ThemeManager.colors["midlight"] + palette.highlight: Cpp_ThemeManager.colors["highlight"] + palette.windowText: Cpp_ThemeManager.colors["window_text"] + palette.brightText: Cpp_ThemeManager.colors["bright_text"] palette.buttonText: Cpp_ThemeManager.colors["button_text"] - palette.highlight: Cpp_ThemeManager.colors["switch_highlight"] + palette.toolTipBase: Cpp_ThemeManager.colors["tooltip_base"] + palette.toolTipText: Cpp_ThemeManager.colors["tooltip_text"] + palette.linkVisited: Cpp_ThemeManager.colors["link_visited"] + palette.alternateBase: Cpp_ThemeManager.colors["alternate_base"] palette.placeholderText: Cpp_ThemeManager.colors["placeholder_text"] palette.highlightedText: Cpp_ThemeManager.colors["highlighted_text"] diff --git a/app/qml/MainWindow/Panes/Console.qml b/app/qml/MainWindow/Panes/Console.qml index 42f47d8b..068ae64d 100644 --- a/app/qml/MainWindow/Panes/Console.qml +++ b/app/qml/MainWindow/Panes/Console.qml @@ -54,13 +54,26 @@ Widgets.Pane { // Page { anchors.fill: parent - palette.base: Cpp_ThemeManager.colors["base"] + + palette.mid: Cpp_ThemeManager.colors["mid"] + palette.dark: Cpp_ThemeManager.colors["dark"] palette.text: Cpp_ThemeManager.colors["text"] - palette.button: Cpp_ThemeManager.colors["button"] + palette.base: Cpp_ThemeManager.colors["base"] + palette.link: Cpp_ThemeManager.colors["link"] + palette.light: Cpp_ThemeManager.colors["light"] palette.window: Cpp_ThemeManager.colors["window"] - palette.windowText: Cpp_ThemeManager.colors["text"] + palette.shadow: Cpp_ThemeManager.colors["shadow"] + palette.accent: Cpp_ThemeManager.colors["accent"] + palette.button: Cpp_ThemeManager.colors["button"] + palette.midlight: Cpp_ThemeManager.colors["midlight"] + palette.highlight: Cpp_ThemeManager.colors["highlight"] + palette.windowText: Cpp_ThemeManager.colors["window_text"] + palette.brightText: Cpp_ThemeManager.colors["bright_text"] palette.buttonText: Cpp_ThemeManager.colors["button_text"] - palette.highlight: Cpp_ThemeManager.colors["switch_highlight"] + palette.toolTipBase: Cpp_ThemeManager.colors["tooltip_base"] + palette.toolTipText: Cpp_ThemeManager.colors["tooltip_text"] + palette.linkVisited: Cpp_ThemeManager.colors["link_visited"] + palette.alternateBase: Cpp_ThemeManager.colors["alternate_base"] palette.placeholderText: Cpp_ThemeManager.colors["placeholder_text"] palette.highlightedText: Cpp_ThemeManager.colors["highlighted_text"] diff --git a/app/qml/MainWindow/Panes/Setup.qml b/app/qml/MainWindow/Panes/Setup.qml index 1653fc02..f5acc9a9 100644 --- a/app/qml/MainWindow/Panes/Setup.qml +++ b/app/qml/MainWindow/Panes/Setup.qml @@ -97,13 +97,26 @@ Widgets.Pane { implicitWidth: 0 anchors.fill: parent anchors.topMargin: -6 - palette.base: Cpp_ThemeManager.colors["base"] + + palette.mid: Cpp_ThemeManager.colors["mid"] + palette.dark: Cpp_ThemeManager.colors["dark"] palette.text: Cpp_ThemeManager.colors["text"] - palette.button: Cpp_ThemeManager.colors["button"] + palette.base: Cpp_ThemeManager.colors["base"] + palette.link: Cpp_ThemeManager.colors["link"] + palette.light: Cpp_ThemeManager.colors["light"] palette.window: Cpp_ThemeManager.colors["window"] - palette.windowText: Cpp_ThemeManager.colors["text"] + palette.shadow: Cpp_ThemeManager.colors["shadow"] + palette.accent: Cpp_ThemeManager.colors["accent"] + palette.button: Cpp_ThemeManager.colors["button"] + palette.midlight: Cpp_ThemeManager.colors["midlight"] + palette.highlight: Cpp_ThemeManager.colors["highlight"] + palette.windowText: Cpp_ThemeManager.colors["window_text"] + palette.brightText: Cpp_ThemeManager.colors["bright_text"] palette.buttonText: Cpp_ThemeManager.colors["button_text"] - palette.highlight: Cpp_ThemeManager.colors["switch_highlight"] + palette.toolTipBase: Cpp_ThemeManager.colors["tooltip_base"] + palette.toolTipText: Cpp_ThemeManager.colors["tooltip_text"] + palette.linkVisited: Cpp_ThemeManager.colors["link_visited"] + palette.alternateBase: Cpp_ThemeManager.colors["alternate_base"] palette.placeholderText: Cpp_ThemeManager.colors["placeholder_text"] palette.highlightedText: Cpp_ThemeManager.colors["highlighted_text"] diff --git a/app/qml/MainWindow/Root.qml b/app/qml/MainWindow/Root.qml index 801d85fd..6d56aa6b 100644 --- a/app/qml/MainWindow/Root.qml +++ b/app/qml/MainWindow/Root.qml @@ -252,12 +252,25 @@ Window { // Page { anchors.fill: parent - palette.base: Cpp_ThemeManager.colors["base"] + palette.mid: Cpp_ThemeManager.colors["mid"] + palette.dark: Cpp_ThemeManager.colors["dark"] palette.text: Cpp_ThemeManager.colors["text"] - palette.button: Cpp_ThemeManager.colors["button"] + palette.base: Cpp_ThemeManager.colors["base"] + palette.link: Cpp_ThemeManager.colors["link"] + palette.light: Cpp_ThemeManager.colors["light"] palette.window: Cpp_ThemeManager.colors["window"] + palette.shadow: Cpp_ThemeManager.colors["shadow"] + palette.accent: Cpp_ThemeManager.colors["accent"] + palette.button: Cpp_ThemeManager.colors["button"] + palette.midlight: Cpp_ThemeManager.colors["midlight"] palette.highlight: Cpp_ThemeManager.colors["highlight"] + palette.windowText: Cpp_ThemeManager.colors["window_text"] + palette.brightText: Cpp_ThemeManager.colors["bright_text"] palette.buttonText: Cpp_ThemeManager.colors["button_text"] + palette.toolTipBase: Cpp_ThemeManager.colors["tooltip_base"] + palette.toolTipText: Cpp_ThemeManager.colors["tooltip_text"] + palette.linkVisited: Cpp_ThemeManager.colors["link_visited"] + palette.alternateBase: Cpp_ThemeManager.colors["alternate_base"] palette.placeholderText: Cpp_ThemeManager.colors["placeholder_text"] palette.highlightedText: Cpp_ThemeManager.colors["highlighted_text"] diff --git a/app/qml/ProjectEditor/Root.qml b/app/qml/ProjectEditor/Root.qml index 79a8aa28..b594d31c 100644 --- a/app/qml/ProjectEditor/Root.qml +++ b/app/qml/ProjectEditor/Root.qml @@ -98,13 +98,25 @@ Window { // Page { anchors.fill: parent - palette.base: Cpp_ThemeManager.colors["base"] + palette.mid: Cpp_ThemeManager.colors["mid"] + palette.dark: Cpp_ThemeManager.colors["dark"] palette.text: Cpp_ThemeManager.colors["text"] - palette.button: Cpp_ThemeManager.colors["button"] + palette.base: Cpp_ThemeManager.colors["base"] + palette.link: Cpp_ThemeManager.colors["link"] + palette.light: Cpp_ThemeManager.colors["light"] palette.window: Cpp_ThemeManager.colors["window"] - palette.windowText: Cpp_ThemeManager.colors["text"] + palette.shadow: Cpp_ThemeManager.colors["shadow"] + palette.accent: Cpp_ThemeManager.colors["accent"] + palette.button: Cpp_ThemeManager.colors["button"] + palette.midlight: Cpp_ThemeManager.colors["midlight"] + palette.highlight: Cpp_ThemeManager.colors["highlight"] + palette.windowText: Cpp_ThemeManager.colors["window_text"] + palette.brightText: Cpp_ThemeManager.colors["bright_text"] palette.buttonText: Cpp_ThemeManager.colors["button_text"] - palette.highlight: Cpp_ThemeManager.colors["switch_highlight"] + palette.toolTipBase: Cpp_ThemeManager.colors["tooltip_base"] + palette.toolTipText: Cpp_ThemeManager.colors["tooltip_text"] + palette.linkVisited: Cpp_ThemeManager.colors["link_visited"] + palette.alternateBase: Cpp_ThemeManager.colors["alternate_base"] palette.placeholderText: Cpp_ThemeManager.colors["placeholder_text"] palette.highlightedText: Cpp_ThemeManager.colors["highlighted_text"] diff --git a/app/qml/ProjectEditor/Views/DatasetView.qml b/app/qml/ProjectEditor/Views/DatasetView.qml index 5679ea16..2b3b2a6b 100644 --- a/app/qml/ProjectEditor/Views/DatasetView.qml +++ b/app/qml/ProjectEditor/Views/DatasetView.qml @@ -38,12 +38,25 @@ Widgets.Pane { // User interface elements // Page { - palette.base: Cpp_ThemeManager.colors["base"] + palette.mid: Cpp_ThemeManager.colors["mid"] + palette.dark: Cpp_ThemeManager.colors["dark"] palette.text: Cpp_ThemeManager.colors["text"] - palette.button: Cpp_ThemeManager.colors["button"] + palette.base: Cpp_ThemeManager.colors["base"] + palette.link: Cpp_ThemeManager.colors["link"] + palette.light: Cpp_ThemeManager.colors["light"] palette.window: Cpp_ThemeManager.colors["window"] + palette.shadow: Cpp_ThemeManager.colors["shadow"] + palette.accent: Cpp_ThemeManager.colors["accent"] + palette.button: Cpp_ThemeManager.colors["button"] + palette.midlight: Cpp_ThemeManager.colors["midlight"] palette.highlight: Cpp_ThemeManager.colors["highlight"] + palette.windowText: Cpp_ThemeManager.colors["window_text"] + palette.brightText: Cpp_ThemeManager.colors["bright_text"] palette.buttonText: Cpp_ThemeManager.colors["button_text"] + palette.toolTipBase: Cpp_ThemeManager.colors["tooltip_base"] + palette.toolTipText: Cpp_ThemeManager.colors["tooltip_text"] + palette.linkVisited: Cpp_ThemeManager.colors["link_visited"] + palette.alternateBase: Cpp_ThemeManager.colors["alternate_base"] palette.placeholderText: Cpp_ThemeManager.colors["placeholder_text"] palette.highlightedText: Cpp_ThemeManager.colors["highlighted_text"] diff --git a/app/qml/ProjectEditor/Views/FrameParserView.qml b/app/qml/ProjectEditor/Views/FrameParserView.qml index 7eb13479..f9a1a88b 100644 --- a/app/qml/ProjectEditor/Views/FrameParserView.qml +++ b/app/qml/ProjectEditor/Views/FrameParserView.qml @@ -125,12 +125,25 @@ Widgets.Pane { // Page { anchors.fill: parent - palette.base: Cpp_ThemeManager.colors["base"] + palette.mid: Cpp_ThemeManager.colors["mid"] + palette.dark: Cpp_ThemeManager.colors["dark"] palette.text: Cpp_ThemeManager.colors["text"] - palette.button: Cpp_ThemeManager.colors["button"] + palette.base: Cpp_ThemeManager.colors["base"] + palette.link: Cpp_ThemeManager.colors["link"] + palette.light: Cpp_ThemeManager.colors["light"] palette.window: Cpp_ThemeManager.colors["window"] + palette.shadow: Cpp_ThemeManager.colors["shadow"] + palette.accent: Cpp_ThemeManager.colors["accent"] + palette.button: Cpp_ThemeManager.colors["button"] + palette.midlight: Cpp_ThemeManager.colors["midlight"] palette.highlight: Cpp_ThemeManager.colors["highlight"] + palette.windowText: Cpp_ThemeManager.colors["window_text"] + palette.brightText: Cpp_ThemeManager.colors["bright_text"] palette.buttonText: Cpp_ThemeManager.colors["button_text"] + palette.toolTipBase: Cpp_ThemeManager.colors["tooltip_base"] + palette.toolTipText: Cpp_ThemeManager.colors["tooltip_text"] + palette.linkVisited: Cpp_ThemeManager.colors["link_visited"] + palette.alternateBase: Cpp_ThemeManager.colors["alternate_base"] palette.placeholderText: Cpp_ThemeManager.colors["placeholder_text"] palette.highlightedText: Cpp_ThemeManager.colors["highlighted_text"] diff --git a/app/qml/ProjectEditor/Views/GroupView.qml b/app/qml/ProjectEditor/Views/GroupView.qml index 68bc4127..d19bd2cd 100644 --- a/app/qml/ProjectEditor/Views/GroupView.qml +++ b/app/qml/ProjectEditor/Views/GroupView.qml @@ -37,12 +37,25 @@ Widgets.Pane { // User interface elements // Page { - palette.base: Cpp_ThemeManager.colors["base"] + palette.mid: Cpp_ThemeManager.colors["mid"] + palette.dark: Cpp_ThemeManager.colors["dark"] palette.text: Cpp_ThemeManager.colors["text"] - palette.button: Cpp_ThemeManager.colors["button"] + palette.base: Cpp_ThemeManager.colors["base"] + palette.link: Cpp_ThemeManager.colors["link"] + palette.light: Cpp_ThemeManager.colors["light"] palette.window: Cpp_ThemeManager.colors["window"] + palette.shadow: Cpp_ThemeManager.colors["shadow"] + palette.accent: Cpp_ThemeManager.colors["accent"] + palette.button: Cpp_ThemeManager.colors["button"] + palette.midlight: Cpp_ThemeManager.colors["midlight"] palette.highlight: Cpp_ThemeManager.colors["highlight"] + palette.windowText: Cpp_ThemeManager.colors["window_text"] + palette.brightText: Cpp_ThemeManager.colors["bright_text"] palette.buttonText: Cpp_ThemeManager.colors["button_text"] + palette.toolTipBase: Cpp_ThemeManager.colors["tooltip_base"] + palette.toolTipText: Cpp_ThemeManager.colors["tooltip_text"] + palette.linkVisited: Cpp_ThemeManager.colors["link_visited"] + palette.alternateBase: Cpp_ThemeManager.colors["alternate_base"] palette.placeholderText: Cpp_ThemeManager.colors["placeholder_text"] palette.highlightedText: Cpp_ThemeManager.colors["highlighted_text"] diff --git a/app/qml/Widgets/BigButton.qml b/app/qml/Widgets/BigButton.qml index 68a4a3ee..88d21913 100644 --- a/app/qml/Widgets/BigButton.qml +++ b/app/qml/Widgets/BigButton.qml @@ -37,22 +37,14 @@ ToolButton { palette.buttonText: Cpp_ThemeManager.colors["toolbar_text"] background: Rectangle { - radius: 3 border.width: 1 - color: "transparent" + radius: 3 + color: Cpp_ThemeManager.colors["toolbar_checked_button_background"] border.color: Cpp_ThemeManager.colors["toolbar_checked_button_border"] + opacity: parent.checked ? Cpp_ThemeManager.colors["toolbar_checked_button_opacity"] : 0.0 - - Rectangle { - border.width: 1 - anchors.fill: parent - radius: parent.radius - 1 - anchors.margins: parent.border.width - color: Cpp_ThemeManager.colors["toolbar_checked_button_background"] - border.color: Cpp_ThemeManager.colors["toolbar_checked_button_border"] - } } opacity: enabled ? 1 : 0.5 diff --git a/app/rcc/rcc.qrc b/app/rcc/rcc.qrc index fca5b862..2d6831e9 100644 --- a/app/rcc/rcc.qrc +++ b/app/rcc/rcc.qrc @@ -119,8 +119,14 @@ scripts/frame-parser.js shaders/invert_color.frag shaders/invert_color.qsb - themes/Breeze Classic.json themes/Breeze Dark.json themes/Breeze Light.json + themes/Default.json + themes/macOS Dark.json + themes/macOS Light.json + themes/Outdoor Day.json + themes/Outdoor Night.json + themes/Yaru Dark.json + themes/Yaru Light.json diff --git a/app/rcc/themes/Breeze Dark.json b/app/rcc/themes/Breeze Dark.json index 839e109e..17dc8287 100644 --- a/app/rcc/themes/Breeze Dark.json +++ b/app/rcc/themes/Breeze Dark.json @@ -1,88 +1,100 @@ { - "title": "Breeze Dark", - "colors": { - "groupbox_border": "#43494F", - "groupbox_background": "#31363b", - "groupbox_hard_border": "#43494F", + "title": "Breeze Dark", + "colors": { + "groupbox_border": "#43494F", + "groupbox_background": "#31363b", + "groupbox_hard_border": "#43494F", - "pane_background": "#1C1E20", - "pane_section_label": "#eff0f1", - "pane_caption_bg_top": "#232629", - "pane_caption_border": "#43494F", - "pane_caption_bg_bottom": "#232629", - "pane_caption_foreground": "#eff0f1", + "pane_background": "#1C1E20", + "pane_section_label": "#eff0f1", + "pane_caption_bg_top": "#232629", + "pane_caption_border": "#43494F", + "pane_caption_bg_bottom": "#232629", + "pane_caption_foreground": "#eff0f1", - "pane_hard_caption_bg_top": "#232629", - "pane_hard_caption_border": "#43494F", - "pane_hard_caption_bg_bottom": "#232629", - "pane_hard_caption_foreground": "#eff0f1", + "pane_hard_caption_bg_top": "#232629", + "pane_hard_caption_border": "#43494F", + "pane_hard_caption_bg_bottom": "#232629", + "pane_hard_caption_foreground": "#eff0f1", - "setup_border": "#43494F", - "toolbar_top": "#31363A", - "titlebar_text": "#ffffff", - "toolbar_text": "#eff0f1", - "toolbar_bottom": "#31363A", - "toolbar_border": "#43494F", - "toolbar_separator": "#43494F", - "toolbar_checked_button_opacity": 0.4, - "toolbar_checked_button_border": "#515658", - "toolbar_checked_button_background": "#4e5559", + "setup_border": "#43494F", + "toolbar_top": "#31363A", + "titlebar_text": "#ffffff", + "toolbar_text": "#eff0f1", + "toolbar_bottom": "#31363A", + "toolbar_border": "#43494F", + "toolbar_separator": "#43494F", + "toolbar_checked_button_opacity": 0.4, + "toolbar_checked_button_border": "#515658", + "toolbar_checked_button_background": "#4e5559", - "error": "#f95258", - "csv_switch": "#479e73", - "view_switch": "#3daee9", - "switch_highlight": "#3daee9", - "dashboard_background": "#0C0E10", + "error": "#f95258", + "csv_switch": "#479e73", + "view_switch": "#3daee9", + "switch_highlight": "#3daee9", + "dashboard_background": "#0C0E10", - "text": "#eff0f1", - "base": "#1C1E20", - "button": "#31363A", - "window": "#1C1E20", - "highlight": "#3daee9", - "button_text": "#eff0f1", - "highlighted_text": "#31363b", - "placeholder_text": "#929497", - "alternate_window": "#33363a", + "mid": "#55595e", + "dark": "#31363b", + "text": "#eff0f1", + "base": "#1C1E20", + "link": "#3daee9", + "light": "#474a4e", + "window": "#1C1E20", + "shadow": "#000000", + "accent": "#3daee9", + "button": "#31363A", + "midlight": "#4c5054", + "highlight": "#3daee9", + "window_text": "#eff0f1", + "bright_text": "#ffffff", + "button_text": "#eff0f1", + "tooltip_base": "#31363A", + "tooltip_text": "#eff0f1", + "link_visited": "#2b8cb9", + "alternate_base": "#33363a", + "placeholder_text": "#929497", + "highlighted_text": "#ffffff", - "console_text": "#eff0f1", - "console_base": "#2e3439", - "console_button": "#31363A", - "console_window": "#1C1E20", - "console_highlight": "#3daee9", - "console_button_text": "#eff0f1", - "console_highlighted_text": "#31363b", - "console_placeholder_text": "#929497", + "console_text": "#98C379", + "console_base": "#2e3439", + "console_button": "#31363A", + "console_window": "#1C1E20", + "console_highlight": "#3daee9", + "console_button_text": "#eff0f1", + "console_highlighted_text": "#ffffff", + "console_placeholder_text": "#929497", - "widget_text": "#eff0f1", - "widget_base": "#1C1E20", - "widget_button": "#31363A", - "widget_window": "#1C1E20", - "widget_highlight": "#3daee9", - "widget_button_text": "#eff0f1", - "widget_highlighted_text": "#31363b", - "widget_placeholder_text": "#929497", - "led_color": "#CC323B", + "widget_text": "#eff0f1", + "widget_base": "#1C1E20", + "widget_button": "#31363A", + "widget_window": "#1C1E20", + "widget_highlight": "#3daee9", + "widget_button_text": "#eff0f1", + "widget_highlighted_text": "#31363b", + "widget_placeholder_text": "#929497", + "led_color": "#CC323B", - "table_bg_a": "#f5f5f5", - "table_bg_b": "#ffffff", - "table_text": "#232629", - "table_bg_header": "#FFE792", - "table_fg_header": "#232629", - "table_separator": "#D3D4D4", - "table_border_header": "#FFD74A", - "table_separator_header": "#FFD74A", + "table_bg_a": "#33363a", + "table_bg_b": "#1C1E20", + "table_text": "#eff0f1", + "table_bg_header": "#31363b", + "table_fg_header": "#eff0f1", + "table_separator": "#55595e", + "table_border_header": "#55595e", + "table_separator_header": "#55595e", - "widget_colors": [ - "#3571c6", - "#cc6666", - "#cc9930", - "#4d996f", - "#bb5c9e", - "#db5ea2", - "#6a6a6a", - "#2a9999", - "#e5944d", - "#7a53a0" - ] - } + "widget_colors": [ + "#3571c6", + "#cc6666", + "#cc9930", + "#4d996f", + "#bb5c9e", + "#db5ea2", + "#6a6a6a", + "#2a9999", + "#e5944d", + "#7a53a0" + ] + } } diff --git a/app/rcc/themes/Breeze Light.json b/app/rcc/themes/Breeze Light.json index c39bc042..43d5428f 100644 --- a/app/rcc/themes/Breeze Light.json +++ b/app/rcc/themes/Breeze Light.json @@ -34,15 +34,27 @@ "switch_highlight": "#3daee9", "dashboard_background": "#e0e3e5", + "mid": "#d4d4d4", + "dark": "#b0b0b0", "text": "#232629", "base": "#f9f9f9", - "button": "#eff0f1", + "link": "#3daee9", + "light": "#eff0f1", "window": "#f9f9f9", + "shadow": "#000000", + "accent": "#3daee9", + "button": "#eff0f1", + "midlight": "#e0e0e0", "highlight": "#3daee9", + "window_text": "#232629", + "bright_text": "#ffffff", "button_text": "#232629", - "highlighted_text": "#ffffff", + "tooltip_base": "#eff0f1", + "tooltip_text": "#232629", + "link_visited": "#2b8cb9", + "alternate_base": "#e9e9e9", "placeholder_text": "#929497", - "alternate_window": "#e9e9e9", + "highlighted_text": "#ffffff", "console_text": "#434649", "console_base": "#fcfcfc", diff --git a/app/rcc/themes/Breeze Classic.json b/app/rcc/themes/Default.json similarity index 86% rename from app/rcc/themes/Breeze Classic.json rename to app/rcc/themes/Default.json index cdd1b5fe..10a5c71d 100644 --- a/app/rcc/themes/Breeze Classic.json +++ b/app/rcc/themes/Default.json @@ -1,5 +1,5 @@ { - "title": "Breeze Classic", + "title": "Default", "colors": { "groupbox_border": "#c2c2c2", "groupbox_background": "#eff0f1", @@ -34,15 +34,27 @@ "switch_highlight": "#3daee9", "dashboard_background": "#e0e3e5", + "mid": "#d4d4d4", + "dark": "#b0b0b0", "text": "#232629", "base": "#f9f9f9", - "button": "#eff0f1", + "link": "#3daee9", + "light": "#eff0f1", "window": "#f9f9f9", + "shadow": "#000000", + "accent": "#3daee9", + "button": "#eff0f1", + "midlight": "#e0e0e0", "highlight": "#3daee9", + "window_text": "#232629", + "bright_text": "#ffffff", "button_text": "#232629", - "highlighted_text": "#ffffff", + "tooltip_base": "#eff0f1", + "tooltip_text": "#232629", + "link_visited": "#2b8cb9", + "alternate_base": "#e9e9e9", "placeholder_text": "#929497", - "alternate_window": "#e9e9e9", + "highlighted_text": "#ffffff", "console_text": "#434649", "console_base": "#fcfcfc", diff --git a/app/rcc/themes/Outdoor Day.json b/app/rcc/themes/Outdoor Day.json new file mode 100644 index 00000000..c3ed1b56 --- /dev/null +++ b/app/rcc/themes/Outdoor Day.json @@ -0,0 +1,101 @@ +{ + "title": "Outdoor Day", + "colors": { + "groupbox_border": "#e5e5e5", + "groupbox_background": "#ffffff", + "groupbox_hard_border": "#cccccc", + + "pane_background": "#ffffff", + "pane_section_label": "#000000", + "pane_caption_bg_top": "#f1f1f1", + "pane_caption_border": "#d0d0d0", + "pane_caption_bg_bottom": "#f1f1f1", + "pane_caption_foreground": "#000000", + + "pane_hard_caption_bg_top": "#f1f1f1", + "pane_hard_caption_border": "#d0d0d0", + "pane_hard_caption_bg_bottom": "#f1f1f1", + "pane_hard_caption_foreground": "#000000", + + "setup_border": "#cccccc", + "toolbar_top": "#f5f5f5", + "titlebar_text": "#000000", + "toolbar_text": "#000000", + "toolbar_bottom": "#f5f5f5", + "toolbar_border": "#d0d0d0", + "toolbar_separator": "#d0d0d0", + "toolbar_checked_button_opacity": 1.0, + "toolbar_checked_button_border": "#e2e2e2", + "toolbar_checked_button_background": "#e7e7e7", + + "error": "#ff3b30", + "csv_switch": "#34c759", + "view_switch": "#ff9500", + "switch_highlight": "#ff9500", + "dashboard_background": "#ffffff", + + "mid": "#dcdcdc", + "dark": "#a0a0a0", + "text": "#000000", + "base": "#ffffff", + "link": "#007aff", + "light": "#f1f1f1", + "window": "#ffffff", + "shadow": "#999999", + "accent": "#ff9500", + "button": "#f0f0f0", + "midlight": "#eaeaea", + "highlight": "#007aff", + "window_text": "#000000", + "bright_text": "#000000", + "button_text": "#000000", + "tooltip_base": "#ffffff", + "tooltip_text": "#000000", + "link_visited": "#5856d6", + "alternate_base": "#f9f9f9", + "placeholder_text": "#888888", + "highlighted_text": "#ffffff", + + "console_text": "#000000", + "console_base": "#ffffff", + "console_button": "#f0f0f0", + "console_window": "#ffffff", + "console_highlight": "#007aff", + "console_button_text": "#000000", + "console_highlighted_text": "#ffffff", + "console_placeholder_text": "#888888", + + "widget_text": "#000000", + "widget_base": "#ffffff", + "widget_button": "#f0f0f0", + "widget_window": "#ffffff", + "widget_highlight": "#007aff", + "widget_button_text": "#000000", + "widget_highlighted_text": "#ffffff", + "widget_placeholder_text": "#888888", + "led_color": "#ff3b30", + + "table_bg_a": "#f7f7f7", + "table_bg_b": "#ffffff", + "table_text": "#000000", + "table_bg_header": "#f0f0f0", + "table_fg_header": "#000000", + "table_separator": "#dcdcdc", + "table_border_header": "#dcdcdc", + "table_separator_header": "#dcdcdc", + + "widget_colors": [ + "#007aff", + "#ff9500", + "#34c759", + "#ff3b30", + "#af52de", + "#ffcc00", + "#ff2d55", + "#c7c7cc", + "#8e8e93", + "#007aff", + "#5856d6" + ] + } +} diff --git a/app/rcc/themes/Outdoor Night.json b/app/rcc/themes/Outdoor Night.json new file mode 100644 index 00000000..f7dc9c4f --- /dev/null +++ b/app/rcc/themes/Outdoor Night.json @@ -0,0 +1,101 @@ +{ + "title": "Outdoor Night", + "colors": { + "groupbox_border": "#3a3d42", + "groupbox_background": "#202326", + "groupbox_hard_border": "#3a3d42", + + "pane_background": "#181a1b", + "pane_section_label": "#b0b3b8", + "pane_caption_bg_top": "#232527", + "pane_caption_border": "#3a3d42", + "pane_caption_bg_bottom": "#232527", + "pane_caption_foreground": "#b0b3b8", + + "pane_hard_caption_bg_top": "#232527", + "pane_hard_caption_border": "#3a3d42", + "pane_hard_caption_bg_bottom": "#232527", + "pane_hard_caption_foreground": "#b0b3b8", + + "setup_border": "#3a3d42", + "toolbar_top": "#282a2d", + "titlebar_text": "#b0b3b8", + "toolbar_text": "#b0b3b8", + "toolbar_bottom": "#282a2d", + "toolbar_border": "#3a3d42", + "toolbar_separator": "#3a3d42", + "toolbar_checked_button_opacity": 0.3, + "toolbar_checked_button_border": "#4b4e51", + "toolbar_checked_button_background": "#35373a", + + "error": "#e06c75", + "csv_switch": "#56b6c2", + "view_switch": "#61afef", + "switch_highlight": "#61afef", + "dashboard_background": "#0f1112", + + "mid": "#4b4e51", + "dark": "#2c2e31", + "text": "#b0b3b8", + "base": "#181a1b", + "link": "#61afef", + "light": "#3a3d42", + "window": "#181a1b", + "shadow": "#000000", + "accent": "#61afef", + "button": "#282a2d", + "midlight": "#3a3d42", + "highlight": "#61afef", + "window_text": "#b0b3b8", + "bright_text": "#ffffff", + "button_text": "#b0b3b8", + "tooltip_base": "#282a2d", + "tooltip_text": "#b0b3b8", + "link_visited": "#b16286", + "alternate_base": "#232527", + "placeholder_text": "#8a8d91", + "highlighted_text": "#ffffff", + + "console_text": "#98c379", + "console_base": "#202326", + "console_button": "#282a2d", + "console_window": "#181a1b", + "console_highlight": "#61afef", + "console_button_text": "#b0b3b8", + "console_highlighted_text": "#ffffff", + "console_placeholder_text": "#8a8d91", + + "widget_text": "#b0b3b8", + "widget_base": "#181a1b", + "widget_button": "#282a2d", + "widget_window": "#181a1b", + "widget_highlight": "#61afef", + "widget_button_text": "#b0b3b8", + "widget_highlighted_text": "#2c2e31", + "widget_placeholder_text": "#8a8d91", + "led_color": "#d19a66", + + "table_bg_a": "#232527", + "table_bg_b": "#181a1b", + "table_text": "#b0b3b8", + "table_bg_header": "#282a2d", + "table_fg_header": "#b0b3b8", + "table_separator": "#4b4e51", + "table_border_header": "#4b4e51", + "table_separator_header": "#4b4e51", + + "widget_colors": [ + "#61afef", + "#98c379", + "#e06c75", + "#d19a66", + "#c678dd", + "#ffcc00", + "#ff2d55", + "#7a7c80", + "#8e8e93", + "#61afef", + "#b16286" + ] + } +} diff --git a/app/rcc/themes/Yaru Dark.json b/app/rcc/themes/Yaru Dark.json new file mode 100644 index 00000000..49b555f6 --- /dev/null +++ b/app/rcc/themes/Yaru Dark.json @@ -0,0 +1,101 @@ +{ + "title": "Yaru Dark", + "colors": { + "groupbox_border": "#4a4a4a", + "groupbox_background": "#2c2c2c", + "groupbox_hard_border": "#3f3f3f", + + "pane_background": "#222222", + "pane_section_label": "#eeeeec", + "pane_caption_bg_top": "#333333", + "pane_caption_border": "#4a4a4a", + "pane_caption_bg_bottom": "#333333", + "pane_caption_foreground": "#eeeeec", + + "pane_hard_caption_bg_top": "#333333", + "pane_hard_caption_border": "#4a4a4a", + "pane_hard_caption_bg_bottom": "#333333", + "pane_hard_caption_foreground": "#eeeeec", + + "setup_border": "#4a4a4a", + "toolbar_top": "#3c3c3c", + "titlebar_text": "#eeeeec", + "toolbar_text": "#eeeeec", + "toolbar_bottom": "#3c3c3c", + "toolbar_border": "#4a4a4a", + "toolbar_separator": "#4a4a4a", + "toolbar_checked_button_opacity": 1.0, + "toolbar_checked_button_border": "#4a4a4a", + "toolbar_checked_button_background": "#4a4a4a", + + "error": "#e95420", + "csv_switch": "#4caf50", + "view_switch": "#e95420", + "switch_highlight": "#e95420", + "dashboard_background": "#222222", + + "mid": "#4a4a4a", + "dark": "#2c2c2c", + "text": "#eeeeec", + "base": "#222222", + "link": "#0088cc", + "light": "#4f4f4f", + "window": "#222222", + "shadow": "#000000", + "accent": "#e95420", + "button": "#333333", + "midlight": "#444444", + "highlight": "#e95420", + "window_text": "#eeeeec", + "bright_text": "#ffffff", + "button_text": "#eeeeec", + "tooltip_base": "#333333", + "tooltip_text": "#eeeeec", + "link_visited": "#5e81ac", + "alternate_base": "#2e2e2e", + "placeholder_text": "#888888", + "highlighted_text": "#ffffff", + + "console_text": "#98C379", + "console_base": "#2d2d2f", + "console_button": "#39393b", + "console_window": "#2d2d2f", + "console_highlight": "#0a84ff", + "console_button_text": "#f1f1f1", + "console_highlighted_text": "#ffffff", + "console_placeholder_text": "#a1a1a1", + + "widget_text": "#eeeeec", + "widget_base": "#222222", + "widget_button": "#333333", + "widget_window": "#222222", + "widget_highlight": "#e95420", + "widget_button_text": "#eeeeec", + "widget_highlighted_text": "#ffffff", + "widget_placeholder_text": "#888888", + "led_color": "#e95420", + + "table_bg_a": "#2e2e2e", + "table_bg_b": "#222222", + "table_text": "#eeeeec", + "table_bg_header": "#333333", + "table_fg_header": "#eeeeec", + "table_separator": "#4a4a4a", + "table_border_header": "#4a4a4a", + "table_separator_header": "#4a4a4a", + + "widget_colors": [ + "#e95420", + "#ffdd57", + "#34c759", + "#d64937", + "#bf52ff", + "#ffcc00", + "#ff2d55", + "#6c757d", + "#8e8e93", + "#0088cc", + "#5e81ac" + ] + } +} diff --git a/app/rcc/themes/Yaru Light.json b/app/rcc/themes/Yaru Light.json new file mode 100644 index 00000000..2af9b7f7 --- /dev/null +++ b/app/rcc/themes/Yaru Light.json @@ -0,0 +1,101 @@ +{ + "title": "Yaru Light", + "colors": { + "groupbox_border": "#cccccc", + "groupbox_background": "#f8f8f8", + "groupbox_hard_border": "#d0d0d0", + + "pane_background": "#ffffff", + "pane_section_label": "#3c3c3c", + "pane_caption_bg_top": "#e6e6e6", + "pane_caption_border": "#cccccc", + "pane_caption_bg_bottom": "#e6e6e6", + "pane_caption_foreground": "#3c3c3c", + + "pane_hard_caption_bg_top": "#e6e6e6", + "pane_hard_caption_border": "#cccccc", + "pane_hard_caption_bg_bottom": "#e6e6e6", + "pane_hard_caption_foreground": "#3c3c3c", + + "setup_border": "#cccccc", + "toolbar_top": "#f5f5f5", + "titlebar_text": "#3c3c3c", + "toolbar_text": "#3c3c3c", + "toolbar_bottom": "#f5f5f5", + "toolbar_border": "#cccccc", + "toolbar_separator": "#cccccc", + "toolbar_checked_button_opacity": 1.0, + "toolbar_checked_button_border": "#e0e0e0", + "toolbar_checked_button_background": "#e0e0e0", + + "error": "#e95420", + "csv_switch": "#4caf50", + "view_switch": "#e95420", + "switch_highlight": "#e95420", + "dashboard_background": "#f8f8f8", + + "mid": "#e0e0e0", + "dark": "#a6a6a6", + "text": "#3c3c3c", + "base": "#ffffff", + "link": "#0088cc", + "light": "#eeeeee", + "window": "#ffffff", + "shadow": "#000000", + "accent": "#e95420", + "button": "#f0f0f0", + "midlight": "#eeeeee", + "highlight": "#e95420", + "window_text": "#3c3c3c", + "bright_text": "#000000", + "button_text": "#3c3c3c", + "tooltip_base": "#f0f0f0", + "tooltip_text": "#3c3c3c", + "link_visited": "#5e81ac", + "alternate_base": "#f6f6f6", + "placeholder_text": "#888888", + "highlighted_text": "#ffffff", + + "console_text": "#333333", + "console_base": "#ffffff", + "console_button": "#f0f0f0", + "console_window": "#ffffff", + "console_highlight": "#e95420", + "console_button_text": "#3c3c3c", + "console_highlighted_text": "#ffffff", + "console_placeholder_text": "#888888", + + "widget_text": "#3c3c3c", + "widget_base": "#ffffff", + "widget_button": "#f0f0f0", + "widget_window": "#ffffff", + "widget_highlight": "#e95420", + "widget_button_text": "#3c3c3c", + "widget_highlighted_text": "#ffffff", + "widget_placeholder_text": "#888888", + "led_color": "#e95420", + + "table_bg_a": "#f7f7f7", + "table_bg_b": "#ffffff", + "table_text": "#3c3c3c", + "table_bg_header": "#eeeeee", + "table_fg_header": "#3c3c3c", + "table_separator": "#dcdcdc", + "table_border_header": "#dcdcdc", + "table_separator_header": "#dcdcdc", + + "widget_colors": [ + "#e95420", + "#ffdd57", + "#34c759", + "#d64937", + "#bf52ff", + "#ffcc00", + "#ff2d55", + "#6c757d", + "#8e8e93", + "#0088cc", + "#5e81ac" + ] + } +} diff --git a/app/rcc/themes/macOS Dark.json b/app/rcc/themes/macOS Dark.json new file mode 100644 index 00000000..7fdc3441 --- /dev/null +++ b/app/rcc/themes/macOS Dark.json @@ -0,0 +1,101 @@ +{ + "title": "macOS Dark", + "colors": { + "groupbox_border": "#4a4a4a", + "groupbox_background": "#2b2b2b", + "groupbox_hard_border": "#3d3d3d", + + "pane_background": "#1c1c1e", + "pane_section_label": "#f1f1f1", + "pane_caption_bg_top": "#2c2c2e", + "pane_caption_border": "#4a4a4a", + "pane_caption_bg_bottom": "#2c2c2e", + "pane_caption_foreground": "#f1f1f1", + + "pane_hard_caption_bg_top": "#2c2c2e", + "pane_hard_caption_border": "#4a4a4a", + "pane_hard_caption_bg_bottom": "#2c2c2e", + "pane_hard_caption_foreground": "#f1f1f1", + + "setup_border": "#5a5a5a", + "toolbar_top": "#3a3a3c", + "titlebar_text": "#f1f1f1", + "toolbar_text": "#f1f1f1", + "toolbar_bottom": "#3a3a3c", + "toolbar_border": "#5a5a5a", + "toolbar_separator": "#5a5a5a", + "toolbar_checked_button_opacity": 1.0, + "toolbar_checked_button_border": "#4b4b4b", + "toolbar_checked_button_background": "#4f4f4f", + + "error": "#ff453a", + "csv_switch": "#007D19", + "view_switch": "#0a84ff", + "switch_highlight": "#0a84ff", + "dashboard_background": "#1c1c1e", + + "mid": "#505256", + "dark": "#505256", + "text": "#f1f1f1", + "base": "#1c1c1e", + "link": "#0a84ff", + "light": "#616366", + "window": "#1c1c1e", + "shadow": "#000000", + "accent": "#0a84ff", + "button": "#2c2c2e", + "midlight": "#484a4d", + "highlight": "#0a84ff", + "window_text": "#f1f1f1", + "bright_text": "#ffffff", + "button_text": "#f1f1f1", + "tooltip_base": "#2c2c2e", + "tooltip_text": "#f1f1f1", + "link_visited": "#5e5ce6", + "alternate_base": "#2c2c2e", + "placeholder_text": "#767676", + "highlighted_text": "#ffffff", + + "console_text": "#98C379", + "console_base": "#2d2d2f", + "console_button": "#39393b", + "console_window": "#2d2d2f", + "console_highlight": "#0a84ff", + "console_button_text": "#f1f1f1", + "console_highlighted_text": "#ffffff", + "console_placeholder_text": "#a1a1a1", + + "widget_text": "#f1f1f1", + "widget_base": "#1c1c1e", + "widget_button": "#2c2c2e", + "widget_window": "#1c1c1e", + "widget_highlight": "#0a84ff", + "widget_button_text": "#f1f1f1", + "widget_highlighted_text": "#ffffff", + "widget_placeholder_text": "#767676", + "led_color": "#ff453a", + + "table_bg_a": "#2b2b2b", + "table_bg_b": "#1c1c1e", + "table_text": "#f1f1f1", + "table_bg_header": "#3a3a3c", + "table_fg_header": "#f1f1f1", + "table_separator": "#4a4a4a", + "table_border_header": "#4a4a4a", + "table_separator_header": "#4a4a4a", + + "widget_colors": [ + "#0a84ff", + "#ff9f0a", + "#32d74b", + "#ff453a", + "#bf5af2", + "#ffd60a", + "#ff375f", + "#636366", + "#8e8e93", + "#0a84ff", + "#5e5ce6" + ] + } +} diff --git a/app/rcc/themes/macOS Light.json b/app/rcc/themes/macOS Light.json new file mode 100644 index 00000000..57d1508f --- /dev/null +++ b/app/rcc/themes/macOS Light.json @@ -0,0 +1,101 @@ +{ + "title": "macOS Light", + "colors": { + "groupbox_border": "#d1d1d1", + "groupbox_background": "#f1f1f1", + "groupbox_hard_border": "#d8d8d8", + + "pane_background": "#ffffff", + "pane_section_label": "#1d1d1d", + "pane_caption_bg_top": "#e0e0e0", + "pane_caption_border": "#d0d0d0", + "pane_caption_bg_bottom": "#e0e0e0", + "pane_caption_foreground": "#1d1d1d", + + "pane_hard_caption_bg_top": "#e0e0e0", + "pane_hard_caption_border": "#d0d0d0", + "pane_hard_caption_bg_bottom": "#e0e0e0", + "pane_hard_caption_foreground": "#1d1d1d", + + "setup_border": "#d0d0d0", + "toolbar_top": "#f5f5f5", + "titlebar_text": "#1d1d1d", + "toolbar_text": "#1d1d1d", + "toolbar_bottom": "#f5f5f5", + "toolbar_border": "#d0d0d0", + "toolbar_separator": "#d0d0d0", + "toolbar_checked_button_opacity": 1.0, + "toolbar_checked_button_border": "#e2e2e2", + "toolbar_checked_button_background": "#e7e7e7", + + "error": "#ff3b30", + "csv_switch": "#00B440", + "view_switch": "#007aff", + "switch_highlight": "#007aff", + "dashboard_background": "#f1f1f1", + + "mid": "#d1d1d1", + "dark": "#a6a6a6", + "text": "#1d1d1d", + "base": "#ffffff", + "link": "#007aff", + "light": "#e0e0e0", + "window": "#ffffff", + "shadow": "#000000", + "accent": "#007aff", + "button": "#f0f0f0", + "midlight": "#e5e5e5", + "highlight": "#007aff", + "window_text": "#1d1d1d", + "bright_text": "#000000", + "button_text": "#1d1d1d", + "tooltip_base": "#f0f0f0", + "tooltip_text": "#1d1d1d", + "link_visited": "#5856d6", + "alternate_base": "#f9f9f9", + "placeholder_text": "#a9a9a9", + "highlighted_text": "#ffffff", + + "console_text": "#333333", + "console_base": "#ffffff", + "console_button": "#f0f0f0", + "console_window": "#ffffff", + "console_highlight": "#007aff", + "console_button_text": "#1d1d1d", + "console_highlighted_text": "#ffffff", + "console_placeholder_text": "#a9a9a9", + + "widget_text": "#1d1d1d", + "widget_base": "#ffffff", + "widget_button": "#f0f0f0", + "widget_window": "#ffffff", + "widget_highlight": "#007aff", + "widget_button_text": "#1d1d1d", + "widget_highlighted_text": "#ffffff", + "widget_placeholder_text": "#a9a9a9", + "led_color": "#ff3b30", + + "table_bg_a": "#f8f8f8", + "table_bg_b": "#ffffff", + "table_text": "#1d1d1d", + "table_bg_header": "#f0f0f0", + "table_fg_header": "#1d1d1d", + "table_separator": "#dcdcdc", + "table_border_header": "#dcdcdc", + "table_separator_header": "#dcdcdc", + + "widget_colors": [ + "#007aff", + "#ff9500", + "#34c759", + "#ff3b30", + "#af52de", + "#ffcc00", + "#ff2d55", + "#c7c7cc", + "#8e8e93", + "#007aff", + "#5856d6" + ] + } +} diff --git a/app/src/Misc/ThemeManager.cpp b/app/src/Misc/ThemeManager.cpp index 8c24bc62..04f517f5 100644 --- a/app/src/Misc/ThemeManager.cpp +++ b/app/src/Misc/ThemeManager.cpp @@ -40,16 +40,24 @@ Misc::ThemeManager::ThemeManager() : m_theme(0) { // Set theme files - QStringList themes = { - QStringLiteral(":/rcc/themes/Breeze Classic.json"), - QStringLiteral(":/rcc/themes/Breeze Dark.json"), - QStringLiteral(":/rcc/themes/Breeze Light.json"), + // clang-format off + m_availableThemes = { + QStringLiteral("Default"), + QStringLiteral("Outdoor Day"), + QStringLiteral("Outdoor Night"), + QStringLiteral("Breeze Light"), + QStringLiteral("Breeze Dark"), + QStringLiteral("macOS Light"), + QStringLiteral("macOS Dark"), + QStringLiteral("Yaru Light"), + QStringLiteral("Yaru Dark"), }; + // clang-format on // Load theme files - foreach (auto theme, themes) + foreach (auto theme, m_availableThemes) { - QFile file(theme); + QFile file(QStringLiteral(":/rcc/themes/%1.json").arg(theme)); if (file.open(QFile::ReadOnly)) { auto document = QJsonDocument::fromJson(file.readAll()); @@ -109,9 +117,9 @@ const QJsonObject &Misc::ThemeManager::colors() const * @brief Returns a list of theme names that are available. * @return QStringList containing the names of all loaded themes. */ -QStringList Misc::ThemeManager::availableThemes() const +const QStringList &Misc::ThemeManager::availableThemes() const { - return m_themes.keys(); + return m_availableThemes; } /** @@ -137,13 +145,42 @@ QColor Misc::ThemeManager::getColor(const QString &name) const */ void Misc::ThemeManager::setTheme(const int index) { + // Validate index auto filteredIndex = index; if (index < 0 || index >= availableThemes().count()) filteredIndex = 0; + // Update the theme & obtain the colors m_theme = filteredIndex; m_settings.setValue("Theme", filteredIndex); m_themeName = availableThemes().at(filteredIndex); m_colors = m_themes.value(m_themeName); + + // Set application palette + QPalette palette; + palette.setColor(QPalette::Mid, getColor("mid")); + palette.setColor(QPalette::Dark, getColor("dark")); + palette.setColor(QPalette::Text, getColor("text")); + palette.setColor(QPalette::Base, getColor("base")); + palette.setColor(QPalette::Link, getColor("link")); + palette.setColor(QPalette::Light, getColor("light")); + palette.setColor(QPalette::Window, getColor("window")); + palette.setColor(QPalette::Shadow, getColor("shadow")); + palette.setColor(QPalette::Accent, getColor("accent")); + palette.setColor(QPalette::Button, getColor("button")); + palette.setColor(QPalette::Midlight, getColor("midlight")); + palette.setColor(QPalette::Highlight, getColor("highlight")); + palette.setColor(QPalette::WindowText, getColor("window_text")); + palette.setColor(QPalette::BrightText, getColor("bright_text")); + palette.setColor(QPalette::ButtonText, getColor("button_text")); + palette.setColor(QPalette::ToolTipBase, getColor("tooltip_base")); + palette.setColor(QPalette::ToolTipText, getColor("tooltip_text")); + palette.setColor(QPalette::LinkVisited, getColor("link_visited")); + palette.setColor(QPalette::AlternateBase, getColor("alternate_base")); + palette.setColor(QPalette::PlaceholderText, getColor("placeholder_text")); + palette.setColor(QPalette::HighlightedText, getColor("highlighted_text")); + qApp->setPalette(palette); + + // Update UI Q_EMIT themeChanged(); } diff --git a/app/src/Misc/ThemeManager.h b/app/src/Misc/ThemeManager.h index e9cc0a11..0f58971d 100644 --- a/app/src/Misc/ThemeManager.h +++ b/app/src/Misc/ThemeManager.h @@ -124,7 +124,7 @@ public: [[nodiscard]] int theme() const; [[nodiscard]] const QString &themeName() const; [[nodiscard]] const QJsonObject &colors() const; - [[nodiscard]] QStringList availableThemes() const; + [[nodiscard]] const QStringList &availableThemes() const; [[nodiscard]] QColor getColor(const QString &name) const; public slots: @@ -136,6 +136,8 @@ private: QSettings m_settings; QJsonObject m_colors; + + QStringList m_availableThemes; QMap m_themes; }; } // namespace Misc