From fa815c3eee27cdae69b2e765b03de62a13f6379d Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 4 Sep 2021 02:31:10 +0200 Subject: Make font sizes customizable with a config file, see example-config.json. Remove environment variables --- include/Config.hpp | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 include/Config.hpp (limited to 'include/Config.hpp') diff --git a/include/Config.hpp b/include/Config.hpp new file mode 100644 index 0000000..0cdabe9 --- /dev/null +++ b/include/Config.hpp @@ -0,0 +1,45 @@ +#pragma once + +#include + +namespace QuickMedia { + struct SearchConfig { + int font_size = 16; + }; + + struct TabConfig { + int font_size = 16; + }; + + struct BodyConfig { + int title_font_size = 16; + int author_font_size = 14; + int description_font_size = 14; + int timestamp_font_size = 10; + int reaction_font_size = 14; + int progress_font_size = 14; + int replies_font_size = 14; + int embedded_load_font_size = 14; + }; + + struct InputConfig { + int font_size = 16; + }; + + struct Config { + Config() = default; + Config(const Config&) = delete; + Config&operator=(const Config&) = delete; + + SearchConfig search; + TabConfig tab; + BodyConfig body; + InputConfig input; + bool use_system_fonts = false; + std::string theme = "default"; + float scale = 1.0f; + float font_scale = 1.0f; + }; + + const Config& get_config(); +} \ No newline at end of file -- cgit v1.2.3