From 3f343ff97e5873f66ba1f295641cae1c7b8fe11a Mon Sep 17 00:00:00 2001 From: hachem Date: Tue, 24 Mar 2026 05:10:09 +0100 Subject: feat: theme system --- src/ui/theme.h | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 src/ui/theme.h (limited to 'src/ui/theme.h') diff --git a/src/ui/theme.h b/src/ui/theme.h new file mode 100644 index 0000000..da17c18 --- /dev/null +++ b/src/ui/theme.h @@ -0,0 +1,48 @@ +#pragma once + +#include + +#include +#include +#include + +namespace Hsdbg +{ + struct Theme + { + std::string name = "Midnight"; + + ImVec4 text = ImVec4(0.925f, 0.933f, 0.953f, 1.00f); + ImVec4 text_dim = ImVec4(0.514f, 0.545f, 0.620f, 1.00f); + ImVec4 bg = ImVec4(0.082f, 0.086f, 0.110f, 1.00f); + ImVec4 bg_low = ImVec4(0.063f, 0.067f, 0.086f, 1.00f); + ImVec4 bg_high = ImVec4(0.118f, 0.125f, 0.157f, 1.00f); + ImVec4 surface = ImVec4(0.149f, 0.161f, 0.200f, 1.00f); + ImVec4 border = ImVec4(0.212f, 0.227f, 0.278f, 1.00f); + + ImVec4 accent = ImVec4(0.302f, 0.714f, 0.769f, 1.00f); + float rounding = 6.0f; + float window_border = 1.0f; + + ImVec4 syntax_keyword = ImVec4(0.337f, 0.612f, 0.839f, 1.00f); + ImVec4 syntax_type = ImVec4(0.306f, 0.788f, 0.690f, 1.00f); + ImVec4 syntax_string = ImVec4(0.808f, 0.569f, 0.471f, 1.00f); + ImVec4 syntax_number = ImVec4(0.710f, 0.808f, 0.659f, 1.00f); + ImVec4 syntax_comment = ImVec4(0.416f, 0.600f, 0.333f, 1.00f); + ImVec4 syntax_preprocessor = ImVec4(0.773f, 0.525f, 0.753f, 1.00f); + ImVec4 current_line = ImVec4(0.227f, 0.282f, 0.180f, 1.00f); + }; + + struct ThemeEntry + { + std::string id; + std::string name; + std::filesystem::path path; + }; + + auto default_theme() -> Theme; + + auto list_themes(const std::filesystem::path& dir) -> std::vector; + + auto load_theme(const std::filesystem::path& path) -> Theme; +} -- cgit v1.3