aboutsummaryrefslogtreecommitdiff
path: root/src/Theme.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-09-04 02:31:10 +0200
committerdec05eba <dec05eba@protonmail.com>2021-09-04 02:31:10 +0200
commitfa815c3eee27cdae69b2e765b03de62a13f6379d (patch)
tree4244ae7b62e2c94d749f0b199dd620bdd251dad0 /src/Theme.cpp
parentdd4573e05cdfa2d9b99ef7a49c99e27c201da3e9 (diff)
Make font sizes customizable with a config file, see example-config.json. Remove environment variables
Diffstat (limited to 'src/Theme.cpp')
-rw-r--r--src/Theme.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Theme.cpp b/src/Theme.cpp
index 18581ff..a197848 100644
--- a/src/Theme.cpp
+++ b/src/Theme.cpp
@@ -1,4 +1,5 @@
#include "../include/Theme.hpp"
+#include "../include/Config.hpp"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
@@ -76,10 +77,7 @@ namespace QuickMedia {
init_theme_dark();
init_theme_nord();
- char *theme = getenv("QM_THEME");
- if(!theme)
- return;
-
+ const char *theme = get_config().theme.c_str();
if(strcmp(theme, "default") == 0)
current_theme = THEME_DARK;
else if(strcmp(theme, "nord") == 0)
@@ -92,7 +90,7 @@ namespace QuickMedia {
current_theme = theme;
}
- Theme& get_current_theme() {
+ const Theme& get_current_theme() {
assert(themes_initialized);
return themes[current_theme];
}