diff options
| author | hachem <im@hachem.wtf> | 2026-03-24 05:10:09 +0100 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-03-24 05:10:09 +0100 |
| commit | 3f343ff97e5873f66ba1f295641cae1c7b8fe11a (patch) | |
| tree | 2ac38ba75c6e0b95f747e0f613b941fe4f61a695 /src/ui/theme.h | |
| parent | f05f271db9719d974d4e6cab586086168045fc2c (diff) | |
feat: theme system
Diffstat (limited to 'src/ui/theme.h')
| -rw-r--r-- | src/ui/theme.h | 48 |
1 files changed, 48 insertions, 0 deletions
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 <imgui.h> + +#include <filesystem> +#include <string> +#include <vector> + +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<ThemeEntry>; + + auto load_theme(const std::filesystem::path& path) -> Theme; +} |
