Refactor syntax highlighting infrastructure and related classes.
- Moved all language highlighter implementations (`CppHighlighter`, `GoHighlighter`, `JsonHighlighter`, etc.), the engine, and registry to `syntax/`.
This commit is contained in:
177
themes/EInk.h
Normal file
177
themes/EInk.h
Normal file
@@ -0,0 +1,177 @@
|
||||
// themes/EInk.h — Monochrome e-ink inspired ImGui themes (header-only)
|
||||
#pragma once
|
||||
#include "imgui.h"
|
||||
#include "ThemeHelpers.h"
|
||||
|
||||
// Expects to be included from GUITheme.h after <imgui.h> and RGBA() helper
|
||||
|
||||
static void
|
||||
ApplyEInkImGuiTheme()
|
||||
{
|
||||
// E-Ink grayscale palette (light background)
|
||||
const ImVec4 paper = RGBA(0xF2F2EE); // light paper
|
||||
const ImVec4 bg1 = RGBA(0xE6E6E2);
|
||||
const ImVec4 bg2 = RGBA(0xDADAD5);
|
||||
const ImVec4 bg3 = RGBA(0xCFCFCA);
|
||||
const ImVec4 ink = RGBA(0x111111); // primary text (near black)
|
||||
const ImVec4 dim = RGBA(0x666666); // disabled text
|
||||
const ImVec4 border = RGBA(0xB8B8B3);
|
||||
const ImVec4 accent = RGBA(0x222222); // controls/active
|
||||
|
||||
ImGuiStyle &style = ImGui::GetStyle();
|
||||
style.WindowPadding = ImVec2(8.0f, 8.0f);
|
||||
style.FramePadding = ImVec2(6.0f, 4.0f);
|
||||
style.CellPadding = ImVec2(6.0f, 4.0f);
|
||||
style.ItemSpacing = ImVec2(6.0f, 6.0f);
|
||||
style.ItemInnerSpacing = ImVec2(6.0f, 4.0f);
|
||||
style.ScrollbarSize = 14.0f;
|
||||
style.GrabMinSize = 10.0f;
|
||||
style.WindowRounding = 0.0f;
|
||||
style.FrameRounding = 0.0f;
|
||||
style.PopupRounding = 0.0f;
|
||||
style.GrabRounding = 0.0f;
|
||||
style.TabRounding = 0.0f;
|
||||
style.WindowBorderSize = 1.0f;
|
||||
style.FrameBorderSize = 1.0f;
|
||||
|
||||
ImVec4 *colors = style.Colors;
|
||||
colors[ImGuiCol_Text] = ink;
|
||||
colors[ImGuiCol_TextDisabled] = ImVec4(dim.x, dim.y, dim.z, 1.0f);
|
||||
colors[ImGuiCol_WindowBg] = paper;
|
||||
colors[ImGuiCol_ChildBg] = paper;
|
||||
colors[ImGuiCol_PopupBg] = ImVec4(bg1.x, bg1.y, bg1.z, 0.98f);
|
||||
colors[ImGuiCol_Border] = border;
|
||||
colors[ImGuiCol_BorderShadow] = RGBA(0x000000, 0.0f);
|
||||
colors[ImGuiCol_FrameBg] = bg2;
|
||||
colors[ImGuiCol_FrameBgHovered] = bg3;
|
||||
colors[ImGuiCol_FrameBgActive] = bg1;
|
||||
colors[ImGuiCol_TitleBg] = bg1;
|
||||
colors[ImGuiCol_TitleBgActive] = bg2;
|
||||
colors[ImGuiCol_TitleBgCollapsed] = bg1;
|
||||
colors[ImGuiCol_MenuBarBg] = bg1;
|
||||
colors[ImGuiCol_ScrollbarBg] = paper;
|
||||
colors[ImGuiCol_ScrollbarGrab] = bg3;
|
||||
colors[ImGuiCol_ScrollbarGrabHovered] = bg2;
|
||||
colors[ImGuiCol_ScrollbarGrabActive] = bg1;
|
||||
colors[ImGuiCol_CheckMark] = accent;
|
||||
colors[ImGuiCol_SliderGrab] = accent;
|
||||
colors[ImGuiCol_SliderGrabActive] = ink;
|
||||
colors[ImGuiCol_Button] = bg3;
|
||||
colors[ImGuiCol_ButtonHovered] = bg2;
|
||||
colors[ImGuiCol_ButtonActive] = bg1;
|
||||
colors[ImGuiCol_Header] = bg3;
|
||||
colors[ImGuiCol_HeaderHovered] = bg2;
|
||||
colors[ImGuiCol_HeaderActive] = bg2;
|
||||
colors[ImGuiCol_Separator] = border;
|
||||
colors[ImGuiCol_SeparatorHovered] = bg2;
|
||||
colors[ImGuiCol_SeparatorActive] = accent;
|
||||
colors[ImGuiCol_ResizeGrip] = ImVec4(ink.x, ink.y, ink.z, 0.12f);
|
||||
colors[ImGuiCol_ResizeGripHovered] = ImVec4(accent.x, accent.y, accent.z, 0.50f);
|
||||
colors[ImGuiCol_ResizeGripActive] = ink;
|
||||
colors[ImGuiCol_Tab] = bg2;
|
||||
colors[ImGuiCol_TabHovered] = bg1;
|
||||
colors[ImGuiCol_TabActive] = bg3;
|
||||
colors[ImGuiCol_TabUnfocused] = bg2;
|
||||
colors[ImGuiCol_TabUnfocusedActive] = bg3;
|
||||
colors[ImGuiCol_TableHeaderBg] = bg2;
|
||||
colors[ImGuiCol_TableBorderStrong] = bg1;
|
||||
colors[ImGuiCol_TableBorderLight] = ImVec4(bg1.x, bg1.y, bg1.z, 0.6f);
|
||||
colors[ImGuiCol_TableRowBg] = ImVec4(bg1.x, bg1.y, bg1.z, 0.2f);
|
||||
colors[ImGuiCol_TableRowBgAlt] = ImVec4(bg1.x, bg1.y, bg1.z, 0.35f);
|
||||
colors[ImGuiCol_TextSelectedBg] = ImVec4(accent.x, accent.y, accent.z, 0.30f);
|
||||
colors[ImGuiCol_DragDropTarget] = accent;
|
||||
colors[ImGuiCol_NavHighlight] = accent;
|
||||
colors[ImGuiCol_NavWindowingHighlight] = ImVec4(ink.x, ink.y, ink.z, 0.70f);
|
||||
colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.0f, 0.0f, 0.0f, 0.45f);
|
||||
colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.0f, 0.0f, 0.0f, 0.45f);
|
||||
colors[ImGuiCol_PlotLines] = accent;
|
||||
colors[ImGuiCol_PlotLinesHovered] = ink;
|
||||
colors[ImGuiCol_PlotHistogram] = accent;
|
||||
colors[ImGuiCol_PlotHistogramHovered] = ink;
|
||||
}
|
||||
|
||||
|
||||
static inline void
|
||||
ApplyEInkDarkImGuiTheme()
|
||||
{
|
||||
// E-Ink dark variant (dark background, light ink)
|
||||
const ImVec4 paper = RGBA(0x1A1A1A);
|
||||
const ImVec4 bg1 = RGBA(0x222222);
|
||||
const ImVec4 bg2 = RGBA(0x2B2B2B);
|
||||
const ImVec4 bg3 = RGBA(0x343434);
|
||||
const ImVec4 ink = RGBA(0xEDEDEA);
|
||||
const ImVec4 dim = RGBA(0xB5B5B3);
|
||||
const ImVec4 border = RGBA(0x444444);
|
||||
const ImVec4 accent = RGBA(0xDDDDDD);
|
||||
|
||||
ImGuiStyle &style = ImGui::GetStyle();
|
||||
style.WindowPadding = ImVec2(8.0f, 8.0f);
|
||||
style.FramePadding = ImVec2(6.0f, 4.0f);
|
||||
style.CellPadding = ImVec2(6.0f, 4.0f);
|
||||
style.ItemSpacing = ImVec2(6.0f, 6.0f);
|
||||
style.ItemInnerSpacing = ImVec2(6.0f, 4.0f);
|
||||
style.ScrollbarSize = 14.0f;
|
||||
style.GrabMinSize = 10.0f;
|
||||
style.WindowRounding = 0.0f;
|
||||
style.FrameRounding = 0.0f;
|
||||
style.PopupRounding = 0.0f;
|
||||
style.GrabRounding = 0.0f;
|
||||
style.TabRounding = 0.0f;
|
||||
style.WindowBorderSize = 1.0f;
|
||||
style.FrameBorderSize = 1.0f;
|
||||
|
||||
ImVec4 *colors = style.Colors;
|
||||
colors[ImGuiCol_Text] = ink;
|
||||
colors[ImGuiCol_TextDisabled] = ImVec4(dim.x, dim.y, dim.z, 1.0f);
|
||||
colors[ImGuiCol_WindowBg] = paper;
|
||||
colors[ImGuiCol_ChildBg] = paper;
|
||||
colors[ImGuiCol_PopupBg] = ImVec4(bg1.x, bg1.y, bg1.z, 0.98f);
|
||||
colors[ImGuiCol_Border] = border;
|
||||
colors[ImGuiCol_BorderShadow] = RGBA(0x000000, 0.0f);
|
||||
colors[ImGuiCol_FrameBg] = bg2;
|
||||
colors[ImGuiCol_FrameBgHovered] = bg3;
|
||||
colors[ImGuiCol_FrameBgActive] = bg1;
|
||||
colors[ImGuiCol_TitleBg] = bg1;
|
||||
colors[ImGuiCol_TitleBgActive] = bg2;
|
||||
colors[ImGuiCol_TitleBgCollapsed] = bg1;
|
||||
colors[ImGuiCol_MenuBarBg] = bg1;
|
||||
colors[ImGuiCol_ScrollbarBg] = paper;
|
||||
colors[ImGuiCol_ScrollbarGrab] = bg3;
|
||||
colors[ImGuiCol_ScrollbarGrabHovered] = bg2;
|
||||
colors[ImGuiCol_ScrollbarGrabActive] = bg1;
|
||||
colors[ImGuiCol_CheckMark] = accent;
|
||||
colors[ImGuiCol_SliderGrab] = accent;
|
||||
colors[ImGuiCol_SliderGrabActive] = ink;
|
||||
colors[ImGuiCol_Button] = bg3;
|
||||
colors[ImGuiCol_ButtonHovered] = bg2;
|
||||
colors[ImGuiCol_ButtonActive] = bg1;
|
||||
colors[ImGuiCol_Header] = bg3;
|
||||
colors[ImGuiCol_HeaderHovered] = bg2;
|
||||
colors[ImGuiCol_HeaderActive] = bg2;
|
||||
colors[ImGuiCol_Separator] = border;
|
||||
colors[ImGuiCol_SeparatorHovered] = bg2;
|
||||
colors[ImGuiCol_SeparatorActive] = accent;
|
||||
colors[ImGuiCol_ResizeGrip] = ImVec4(ink.x, ink.y, ink.z, 0.12f);
|
||||
colors[ImGuiCol_ResizeGripHovered] = ImVec4(accent.x, accent.y, accent.z, 0.50f);
|
||||
colors[ImGuiCol_ResizeGripActive] = ink;
|
||||
colors[ImGuiCol_Tab] = bg2;
|
||||
colors[ImGuiCol_TabHovered] = bg1;
|
||||
colors[ImGuiCol_TabActive] = bg3;
|
||||
colors[ImGuiCol_TabUnfocused] = bg2;
|
||||
colors[ImGuiCol_TabUnfocusedActive] = bg3;
|
||||
colors[ImGuiCol_TableHeaderBg] = bg2;
|
||||
colors[ImGuiCol_TableBorderStrong] = bg1;
|
||||
colors[ImGuiCol_TableBorderLight] = ImVec4(bg1.x, bg1.y, bg1.z, 0.6f);
|
||||
colors[ImGuiCol_TableRowBg] = ImVec4(bg1.x, bg1.y, bg1.z, 0.2f);
|
||||
colors[ImGuiCol_TableRowBgAlt] = ImVec4(bg1.x, bg1.y, bg1.z, 0.35f);
|
||||
colors[ImGuiCol_TextSelectedBg] = ImVec4(accent.x, accent.y, accent.z, 0.30f);
|
||||
colors[ImGuiCol_DragDropTarget] = accent;
|
||||
colors[ImGuiCol_NavHighlight] = accent;
|
||||
colors[ImGuiCol_NavWindowingHighlight] = ImVec4(ink.x, ink.y, ink.z, 0.70f);
|
||||
colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.0f, 0.0f, 0.0f, 0.45f);
|
||||
colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.0f, 0.0f, 0.0f, 0.45f);
|
||||
colors[ImGuiCol_PlotLines] = accent;
|
||||
colors[ImGuiCol_PlotLinesHovered] = ink;
|
||||
colors[ImGuiCol_PlotHistogram] = accent;
|
||||
colors[ImGuiCol_PlotHistogramHovered] = ink;
|
||||
}
|
||||
204
themes/Gruvbox.h
Normal file
204
themes/Gruvbox.h
Normal file
@@ -0,0 +1,204 @@
|
||||
// themes/Gruvbox.h — Gruvbox Dark/Light (medium) ImGui themes (header-only)
|
||||
#pragma once
|
||||
#include "ThemeHelpers.h"
|
||||
|
||||
// Expects to be included from GUITheme.h after <imgui.h> and RGBA() helper
|
||||
|
||||
static void
|
||||
ApplyGruvboxDarkMediumTheme()
|
||||
{
|
||||
// Gruvbox (dark, medium) palette
|
||||
const ImVec4 bg0 = RGBA(0x282828); // dark0
|
||||
const ImVec4 bg1 = RGBA(0x3C3836); // dark1
|
||||
const ImVec4 bg2 = RGBA(0x504945); // dark2
|
||||
const ImVec4 bg3 = RGBA(0x665C54); // dark3
|
||||
const ImVec4 fg1 = RGBA(0xEBDBB2); // light1
|
||||
const ImVec4 fg0 = RGBA(0xFBF1C7); // light0
|
||||
// accent colors
|
||||
const ImVec4 yellow = RGBA(0xFABD2F);
|
||||
const ImVec4 blue = RGBA(0x83A598);
|
||||
const ImVec4 aqua = RGBA(0x8EC07C);
|
||||
const ImVec4 orange = RGBA(0xFE8019);
|
||||
|
||||
ImGuiStyle &style = ImGui::GetStyle();
|
||||
style.WindowPadding = ImVec2(8.0f, 8.0f);
|
||||
style.FramePadding = ImVec2(6.0f, 4.0f);
|
||||
style.CellPadding = ImVec2(6.0f, 4.0f);
|
||||
style.ItemSpacing = ImVec2(6.0f, 6.0f);
|
||||
style.ItemInnerSpacing = ImVec2(6.0f, 4.0f);
|
||||
style.ScrollbarSize = 14.0f;
|
||||
style.GrabMinSize = 10.0f;
|
||||
style.WindowRounding = 4.0f;
|
||||
style.FrameRounding = 3.0f;
|
||||
style.PopupRounding = 4.0f;
|
||||
style.GrabRounding = 3.0f;
|
||||
style.TabRounding = 4.0f;
|
||||
style.WindowBorderSize = 1.0f;
|
||||
style.FrameBorderSize = 1.0f;
|
||||
|
||||
ImVec4 *colors = style.Colors;
|
||||
colors[ImGuiCol_Text] = fg1;
|
||||
colors[ImGuiCol_TextDisabled] = ImVec4(fg1.x, fg1.y, fg1.z, 0.55f);
|
||||
colors[ImGuiCol_WindowBg] = bg0;
|
||||
colors[ImGuiCol_ChildBg] = bg0;
|
||||
colors[ImGuiCol_PopupBg] = ImVec4(bg1.x, bg1.y, bg1.z, 0.98f);
|
||||
colors[ImGuiCol_Border] = bg2;
|
||||
colors[ImGuiCol_BorderShadow] = RGBA(0x000000, 0.0f);
|
||||
|
||||
colors[ImGuiCol_FrameBg] = bg2;
|
||||
colors[ImGuiCol_FrameBgHovered] = bg3;
|
||||
colors[ImGuiCol_FrameBgActive] = bg1;
|
||||
|
||||
colors[ImGuiCol_TitleBg] = bg1;
|
||||
colors[ImGuiCol_TitleBgActive] = bg2;
|
||||
colors[ImGuiCol_TitleBgCollapsed] = bg1;
|
||||
|
||||
colors[ImGuiCol_MenuBarBg] = bg1;
|
||||
colors[ImGuiCol_ScrollbarBg] = bg0;
|
||||
colors[ImGuiCol_ScrollbarGrab] = bg3;
|
||||
colors[ImGuiCol_ScrollbarGrabHovered] = bg2;
|
||||
colors[ImGuiCol_ScrollbarGrabActive] = bg1;
|
||||
|
||||
colors[ImGuiCol_CheckMark] = aqua;
|
||||
colors[ImGuiCol_SliderGrab] = aqua;
|
||||
colors[ImGuiCol_SliderGrabActive] = blue;
|
||||
|
||||
colors[ImGuiCol_Button] = bg3;
|
||||
colors[ImGuiCol_ButtonHovered] = bg2;
|
||||
colors[ImGuiCol_ButtonActive] = bg1;
|
||||
|
||||
colors[ImGuiCol_Header] = bg3;
|
||||
colors[ImGuiCol_HeaderHovered] = bg2;
|
||||
colors[ImGuiCol_HeaderActive] = bg2;
|
||||
|
||||
colors[ImGuiCol_Separator] = bg2;
|
||||
colors[ImGuiCol_SeparatorHovered] = bg1;
|
||||
colors[ImGuiCol_SeparatorActive] = blue;
|
||||
|
||||
colors[ImGuiCol_ResizeGrip] = ImVec4(fg0.x, fg0.y, fg0.z, 0.12f);
|
||||
colors[ImGuiCol_ResizeGripHovered] = ImVec4(aqua.x, aqua.y, aqua.z, 0.67f);
|
||||
colors[ImGuiCol_ResizeGripActive] = blue;
|
||||
|
||||
colors[ImGuiCol_Tab] = bg2;
|
||||
colors[ImGuiCol_TabHovered] = bg1;
|
||||
colors[ImGuiCol_TabActive] = bg3;
|
||||
colors[ImGuiCol_TabUnfocused] = bg2;
|
||||
colors[ImGuiCol_TabUnfocusedActive] = bg3;
|
||||
|
||||
colors[ImGuiCol_TableHeaderBg] = bg2;
|
||||
colors[ImGuiCol_TableBorderStrong] = bg1;
|
||||
colors[ImGuiCol_TableBorderLight] = ImVec4(bg1.x, bg1.y, bg1.z, 0.6f);
|
||||
colors[ImGuiCol_TableRowBg] = ImVec4(bg1.x, bg1.y, bg1.z, 0.2f);
|
||||
colors[ImGuiCol_TableRowBgAlt] = ImVec4(bg1.x, bg1.y, bg1.z, 0.35f);
|
||||
|
||||
colors[ImGuiCol_TextSelectedBg] = ImVec4(orange.x, orange.y, orange.z, 0.30f);
|
||||
colors[ImGuiCol_DragDropTarget] = orange;
|
||||
colors[ImGuiCol_NavHighlight] = orange;
|
||||
colors[ImGuiCol_NavWindowingHighlight] = ImVec4(fg0.x, fg0.y, fg0.z, 0.70f);
|
||||
colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.0f, 0.0f, 0.0f, 0.45f);
|
||||
colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.0f, 0.0f, 0.0f, 0.45f);
|
||||
colors[ImGuiCol_PlotLines] = aqua;
|
||||
colors[ImGuiCol_PlotLinesHovered] = blue;
|
||||
colors[ImGuiCol_PlotHistogram] = yellow;
|
||||
colors[ImGuiCol_PlotHistogramHovered] = orange;
|
||||
}
|
||||
|
||||
|
||||
static inline void
|
||||
ApplyGruvboxLightMediumTheme()
|
||||
{
|
||||
// Gruvbox (light, medium) palette
|
||||
const ImVec4 bg0 = RGBA(0xFBF1C7); // light0
|
||||
const ImVec4 bg1 = RGBA(0xEBDBB2); // light1
|
||||
const ImVec4 bg2 = RGBA(0xD5C4A1); // light2
|
||||
const ImVec4 bg3 = RGBA(0xBDAE93); // light3
|
||||
const ImVec4 fg1 = RGBA(0x3C3836); // dark1
|
||||
const ImVec4 fg0 = RGBA(0x282828); // dark0
|
||||
// accents
|
||||
const ImVec4 yellow = RGBA(0xB57614);
|
||||
const ImVec4 blue = RGBA(0x076678);
|
||||
const ImVec4 aqua = RGBA(0x427B58);
|
||||
const ImVec4 orange = RGBA(0xAF3A03);
|
||||
|
||||
ImGuiStyle &style = ImGui::GetStyle();
|
||||
style.WindowPadding = ImVec2(8.0f, 8.0f);
|
||||
style.FramePadding = ImVec2(6.0f, 4.0f);
|
||||
style.CellPadding = ImVec2(6.0f, 4.0f);
|
||||
style.ItemSpacing = ImVec2(6.0f, 6.0f);
|
||||
style.ItemInnerSpacing = ImVec2(6.0f, 4.0f);
|
||||
style.ScrollbarSize = 14.0f;
|
||||
style.GrabMinSize = 10.0f;
|
||||
style.WindowRounding = 4.0f;
|
||||
style.FrameRounding = 3.0f;
|
||||
style.PopupRounding = 4.0f;
|
||||
style.GrabRounding = 3.0f;
|
||||
style.TabRounding = 4.0f;
|
||||
style.WindowBorderSize = 1.0f;
|
||||
style.FrameBorderSize = 1.0f;
|
||||
|
||||
ImVec4 *colors = style.Colors;
|
||||
colors[ImGuiCol_Text] = fg1;
|
||||
colors[ImGuiCol_TextDisabled] = ImVec4(fg1.x, fg1.y, fg1.z, 0.55f);
|
||||
colors[ImGuiCol_WindowBg] = bg0;
|
||||
colors[ImGuiCol_ChildBg] = bg0;
|
||||
colors[ImGuiCol_PopupBg] = ImVec4(bg1.x, bg1.y, bg1.z, 0.98f);
|
||||
colors[ImGuiCol_Border] = bg2;
|
||||
colors[ImGuiCol_BorderShadow] = RGBA(0x000000, 0.0f);
|
||||
|
||||
colors[ImGuiCol_FrameBg] = bg2;
|
||||
colors[ImGuiCol_FrameBgHovered] = bg3;
|
||||
colors[ImGuiCol_FrameBgActive] = bg1;
|
||||
|
||||
colors[ImGuiCol_TitleBg] = bg1;
|
||||
colors[ImGuiCol_TitleBgActive] = bg2;
|
||||
colors[ImGuiCol_TitleBgCollapsed] = bg1;
|
||||
|
||||
colors[ImGuiCol_MenuBarBg] = bg1;
|
||||
colors[ImGuiCol_ScrollbarBg] = bg0;
|
||||
colors[ImGuiCol_ScrollbarGrab] = bg3;
|
||||
colors[ImGuiCol_ScrollbarGrabHovered] = bg2;
|
||||
colors[ImGuiCol_ScrollbarGrabActive] = bg1;
|
||||
|
||||
colors[ImGuiCol_CheckMark] = aqua;
|
||||
colors[ImGuiCol_SliderGrab] = aqua;
|
||||
colors[ImGuiCol_SliderGrabActive] = blue;
|
||||
|
||||
colors[ImGuiCol_Button] = bg3;
|
||||
colors[ImGuiCol_ButtonHovered] = bg2;
|
||||
colors[ImGuiCol_ButtonActive] = bg1;
|
||||
|
||||
colors[ImGuiCol_Header] = bg3;
|
||||
colors[ImGuiCol_HeaderHovered] = bg2;
|
||||
colors[ImGuiCol_HeaderActive] = bg2;
|
||||
|
||||
colors[ImGuiCol_Separator] = bg2;
|
||||
colors[ImGuiCol_SeparatorHovered] = bg1;
|
||||
colors[ImGuiCol_SeparatorActive] = blue;
|
||||
|
||||
colors[ImGuiCol_ResizeGrip] = ImVec4(fg0.x, fg0.y, fg0.z, 0.12f);
|
||||
colors[ImGuiCol_ResizeGripHovered] = ImVec4(aqua.x, aqua.y, aqua.z, 0.67f);
|
||||
colors[ImGuiCol_ResizeGripActive] = blue;
|
||||
|
||||
colors[ImGuiCol_Tab] = bg2;
|
||||
colors[ImGuiCol_TabHovered] = bg1;
|
||||
colors[ImGuiCol_TabActive] = bg3;
|
||||
colors[ImGuiCol_TabUnfocused] = bg2;
|
||||
colors[ImGuiCol_TabUnfocusedActive] = bg3;
|
||||
|
||||
colors[ImGuiCol_TableHeaderBg] = bg2;
|
||||
colors[ImGuiCol_TableBorderStrong] = bg1;
|
||||
colors[ImGuiCol_TableBorderLight] = ImVec4(bg1.x, bg1.y, bg1.z, 0.6f);
|
||||
colors[ImGuiCol_TableRowBg] = ImVec4(bg1.x, bg1.y, bg1.z, 0.2f);
|
||||
colors[ImGuiCol_TableRowBgAlt] = ImVec4(bg1.x, bg1.y, bg1.z, 0.35f);
|
||||
|
||||
colors[ImGuiCol_TextSelectedBg] = ImVec4(orange.x, orange.y, orange.z, 0.30f);
|
||||
colors[ImGuiCol_DragDropTarget] = orange;
|
||||
colors[ImGuiCol_NavHighlight] = orange;
|
||||
colors[ImGuiCol_NavWindowingHighlight] = ImVec4(fg0.x, fg0.y, fg0.z, 0.70f);
|
||||
colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.0f, 0.0f, 0.0f, 0.45f);
|
||||
colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.0f, 0.0f, 0.0f, 0.45f);
|
||||
colors[ImGuiCol_PlotLines] = aqua;
|
||||
colors[ImGuiCol_PlotLinesHovered] = blue;
|
||||
colors[ImGuiCol_PlotHistogram] = yellow;
|
||||
colors[ImGuiCol_PlotHistogramHovered] = orange;
|
||||
}
|
||||
111
themes/Nord.h
Normal file
111
themes/Nord.h
Normal file
@@ -0,0 +1,111 @@
|
||||
// themes/Nord.h — Nord-inspired ImGui theme (header-only)
|
||||
#pragma once
|
||||
#include "ThemeHelpers.h"
|
||||
|
||||
// Expects to be included from GUITheme.h after <imgui.h> and RGBA() helper
|
||||
|
||||
static void
|
||||
ApplyNordImGuiTheme()
|
||||
{
|
||||
// Nord palette
|
||||
const ImVec4 nord0 = RGBA(0x2E3440); // darkest bg
|
||||
const ImVec4 nord1 = RGBA(0x3B4252);
|
||||
const ImVec4 nord2 = RGBA(0x434C5E);
|
||||
const ImVec4 nord3 = RGBA(0x4C566A);
|
||||
const ImVec4 nord4 = RGBA(0xD8DEE9);
|
||||
const ImVec4 nord6 = RGBA(0xECEFF4); // lightest
|
||||
const ImVec4 nord8 = RGBA(0x88C0D0); // cyan
|
||||
const ImVec4 nord9 = RGBA(0x81A1C1); // blue
|
||||
const ImVec4 nord10 = RGBA(0x5E81AC); // blue dark
|
||||
const ImVec4 nord12 = RGBA(0xD08770); // orange
|
||||
const ImVec4 nord13 = RGBA(0xEBCB8B); // yellow
|
||||
|
||||
ImGuiStyle &style = ImGui::GetStyle();
|
||||
|
||||
// Base style tweaks to suit Nord aesthetics
|
||||
style.WindowPadding = ImVec2(8.0f, 8.0f);
|
||||
style.FramePadding = ImVec2(6.0f, 4.0f);
|
||||
style.CellPadding = ImVec2(6.0f, 4.0f);
|
||||
style.ItemSpacing = ImVec2(6.0f, 6.0f);
|
||||
style.ItemInnerSpacing = ImVec2(6.0f, 4.0f);
|
||||
style.ScrollbarSize = 14.0f;
|
||||
style.GrabMinSize = 10.0f;
|
||||
style.WindowRounding = 4.0f;
|
||||
style.FrameRounding = 3.0f;
|
||||
style.PopupRounding = 4.0f;
|
||||
style.GrabRounding = 3.0f;
|
||||
style.TabRounding = 4.0f;
|
||||
style.WindowBorderSize = 1.0f;
|
||||
style.FrameBorderSize = 1.0f;
|
||||
|
||||
ImVec4 *colors = style.Colors;
|
||||
|
||||
colors[ImGuiCol_Text] = nord4; // primary text
|
||||
colors[ImGuiCol_TextDisabled] = ImVec4(nord4.x, nord4.y, nord4.z, 0.55f);
|
||||
colors[ImGuiCol_WindowBg] = nord0;
|
||||
colors[ImGuiCol_ChildBg] = nord0;
|
||||
colors[ImGuiCol_PopupBg] = ImVec4(nord1.x, nord1.y, nord1.z, 0.98f);
|
||||
colors[ImGuiCol_Border] = nord2;
|
||||
colors[ImGuiCol_BorderShadow] = RGBA(0x000000, 0.0f);
|
||||
|
||||
colors[ImGuiCol_FrameBg] = nord2;
|
||||
colors[ImGuiCol_FrameBgHovered] = nord3;
|
||||
colors[ImGuiCol_FrameBgActive] = nord1;
|
||||
|
||||
colors[ImGuiCol_TitleBg] = nord1;
|
||||
colors[ImGuiCol_TitleBgActive] = nord2;
|
||||
colors[ImGuiCol_TitleBgCollapsed] = nord1;
|
||||
|
||||
colors[ImGuiCol_MenuBarBg] = nord1;
|
||||
colors[ImGuiCol_ScrollbarBg] = nord10;
|
||||
colors[ImGuiCol_ScrollbarGrab] = nord3;
|
||||
colors[ImGuiCol_ScrollbarGrabHovered] = nord2;
|
||||
colors[ImGuiCol_ScrollbarGrabActive] = nord1;
|
||||
|
||||
colors[ImGuiCol_CheckMark] = nord8;
|
||||
colors[ImGuiCol_SliderGrab] = nord8;
|
||||
colors[ImGuiCol_SliderGrabActive] = nord9;
|
||||
|
||||
colors[ImGuiCol_Button] = nord3;
|
||||
colors[ImGuiCol_ButtonHovered] = nord2;
|
||||
colors[ImGuiCol_ButtonActive] = nord1;
|
||||
|
||||
colors[ImGuiCol_Header] = nord3;
|
||||
colors[ImGuiCol_HeaderHovered] = nord10;
|
||||
colors[ImGuiCol_HeaderActive] = nord10;
|
||||
|
||||
colors[ImGuiCol_Separator] = nord2;
|
||||
colors[ImGuiCol_SeparatorHovered] = nord10;
|
||||
colors[ImGuiCol_SeparatorActive] = nord9;
|
||||
|
||||
colors[ImGuiCol_ResizeGrip] = ImVec4(nord6.x, nord6.y, nord6.z, 0.12f);
|
||||
colors[ImGuiCol_ResizeGripHovered] = ImVec4(nord8.x, nord8.y, nord8.z, 0.67f);
|
||||
colors[ImGuiCol_ResizeGripActive] = nord9;
|
||||
|
||||
colors[ImGuiCol_Tab] = nord2;
|
||||
colors[ImGuiCol_TabHovered] = nord10;
|
||||
colors[ImGuiCol_TabActive] = nord3;
|
||||
colors[ImGuiCol_TabUnfocused] = nord2;
|
||||
colors[ImGuiCol_TabUnfocusedActive] = nord3;
|
||||
|
||||
// Docking colors omitted for compatibility
|
||||
|
||||
colors[ImGuiCol_TableHeaderBg] = nord2;
|
||||
colors[ImGuiCol_TableBorderStrong] = nord1;
|
||||
colors[ImGuiCol_TableBorderLight] = ImVec4(nord1.x, nord1.y, nord1.z, 0.6f);
|
||||
colors[ImGuiCol_TableRowBg] = ImVec4(nord1.x, nord1.y, nord1.z, 0.2f);
|
||||
colors[ImGuiCol_TableRowBgAlt] = ImVec4(nord1.x, nord1.y, nord1.z, 0.35f);
|
||||
|
||||
colors[ImGuiCol_TextSelectedBg] = ImVec4(nord8.x, nord8.y, nord8.z, 0.35f);
|
||||
colors[ImGuiCol_DragDropTarget] = nord13;
|
||||
colors[ImGuiCol_NavHighlight] = nord9;
|
||||
colors[ImGuiCol_NavWindowingHighlight] = ImVec4(nord6.x, nord6.y, nord6.z, 0.7f);
|
||||
colors[ImGuiCol_NavWindowingDimBg] = ImVec4(nord0.x, nord0.y, nord0.z, 0.6f);
|
||||
colors[ImGuiCol_ModalWindowDimBg] = ImVec4(nord0.x, nord0.y, nord0.z, 0.6f);
|
||||
|
||||
// Plots
|
||||
colors[ImGuiCol_PlotLines] = nord8;
|
||||
colors[ImGuiCol_PlotLinesHovered] = nord9;
|
||||
colors[ImGuiCol_PlotHistogram] = nord13;
|
||||
colors[ImGuiCol_PlotHistogramHovered] = nord12;
|
||||
}
|
||||
89
themes/Plan9.h
Normal file
89
themes/Plan9.h
Normal file
@@ -0,0 +1,89 @@
|
||||
// themes/Plan9.h — Plan 9 acme-inspired ImGui theme (header-only)
|
||||
#pragma once
|
||||
#include "ThemeHelpers.h"
|
||||
|
||||
// Expects to be included from GUITheme.h after <imgui.h> and RGBA() helper
|
||||
|
||||
static void
|
||||
ApplyPlan9Theme()
|
||||
{
|
||||
// Acme-like colors
|
||||
const ImVec4 paper = RGBA(0xFFFFE8); // pale yellow paper
|
||||
const ImVec4 pane = RGBA(0xFFF4C1); // slightly deeper for frames
|
||||
const ImVec4 ink = RGBA(0x000000); // black text
|
||||
constexpr auto dim = ImVec4(0, 0, 0, 0.60f);
|
||||
const ImVec4 border = RGBA(0x000000); // 1px black
|
||||
const ImVec4 blue = RGBA(0x0064FF); // acme-ish blue accents
|
||||
const ImVec4 blueH = RGBA(0x4C8DFF); // hover/active
|
||||
|
||||
ImGuiStyle &style = ImGui::GetStyle();
|
||||
style.WindowPadding = ImVec2(6.0f, 6.0f);
|
||||
style.FramePadding = ImVec2(5.0f, 3.0f);
|
||||
style.CellPadding = ImVec2(5.0f, 3.0f);
|
||||
style.ItemSpacing = ImVec2(6.0f, 6.0f);
|
||||
style.ItemInnerSpacing = ImVec2(6.0f, 4.0f);
|
||||
style.ScrollbarSize = 14.0f;
|
||||
style.GrabMinSize = 10.0f;
|
||||
style.WindowRounding = 0.0f;
|
||||
style.FrameRounding = 0.0f;
|
||||
style.PopupRounding = 0.0f;
|
||||
style.GrabRounding = 0.0f;
|
||||
style.TabRounding = 0.0f;
|
||||
style.WindowBorderSize = 1.0f;
|
||||
style.FrameBorderSize = 1.0f;
|
||||
|
||||
ImVec4 *c = style.Colors;
|
||||
c[ImGuiCol_Text] = ink;
|
||||
c[ImGuiCol_TextDisabled] = dim;
|
||||
c[ImGuiCol_WindowBg] = paper;
|
||||
c[ImGuiCol_ChildBg] = paper;
|
||||
c[ImGuiCol_PopupBg] = ImVec4(pane.x, pane.y, pane.z, 0.98f);
|
||||
c[ImGuiCol_Border] = border;
|
||||
c[ImGuiCol_BorderShadow] = RGBA(0x000000, 0.0f);
|
||||
c[ImGuiCol_FrameBg] = pane;
|
||||
c[ImGuiCol_FrameBgHovered] = RGBA(0xFFEBA0);
|
||||
c[ImGuiCol_FrameBgActive] = RGBA(0xFFE387);
|
||||
c[ImGuiCol_TitleBg] = pane;
|
||||
c[ImGuiCol_TitleBgActive] = RGBA(0xFFE8A6);
|
||||
c[ImGuiCol_TitleBgCollapsed] = pane;
|
||||
c[ImGuiCol_MenuBarBg] = pane;
|
||||
c[ImGuiCol_ScrollbarBg] = paper;
|
||||
c[ImGuiCol_ScrollbarGrab] = RGBA(0xEADFA5);
|
||||
c[ImGuiCol_ScrollbarGrabHovered] = RGBA(0xE2D37F);
|
||||
c[ImGuiCol_ScrollbarGrabActive] = RGBA(0xD8C757);
|
||||
c[ImGuiCol_CheckMark] = blue;
|
||||
c[ImGuiCol_SliderGrab] = blue;
|
||||
c[ImGuiCol_SliderGrabActive] = blueH;
|
||||
c[ImGuiCol_Button] = RGBA(0xFFF1B0);
|
||||
c[ImGuiCol_ButtonHovered] = RGBA(0xFFE892);
|
||||
c[ImGuiCol_ButtonActive] = RGBA(0xFFE072);
|
||||
c[ImGuiCol_Header] = RGBA(0xFFF1B0);
|
||||
c[ImGuiCol_HeaderHovered] = RGBA(0xFFE892);
|
||||
c[ImGuiCol_HeaderActive] = RGBA(0xFFE072);
|
||||
c[ImGuiCol_Separator] = border;
|
||||
c[ImGuiCol_SeparatorHovered] = blue;
|
||||
c[ImGuiCol_SeparatorActive] = blueH;
|
||||
c[ImGuiCol_ResizeGrip] = ImVec4(0, 0, 0, 0.12f);
|
||||
c[ImGuiCol_ResizeGripHovered] = ImVec4(blue.x, blue.y, blue.z, 0.67f);
|
||||
c[ImGuiCol_ResizeGripActive] = blueH;
|
||||
c[ImGuiCol_Tab] = RGBA(0xFFE8A6);
|
||||
c[ImGuiCol_TabHovered] = RGBA(0xFFE072);
|
||||
c[ImGuiCol_TabActive] = RGBA(0xFFD859);
|
||||
c[ImGuiCol_TabUnfocused] = RGBA(0xFFE8A6);
|
||||
c[ImGuiCol_TabUnfocusedActive] = RGBA(0xFFD859);
|
||||
c[ImGuiCol_TableHeaderBg] = RGBA(0xFFE8A6);
|
||||
c[ImGuiCol_TableBorderStrong] = border;
|
||||
c[ImGuiCol_TableBorderLight] = ImVec4(0, 0, 0, 0.35f);
|
||||
c[ImGuiCol_TableRowBg] = ImVec4(0, 0, 0, 0.04f);
|
||||
c[ImGuiCol_TableRowBgAlt] = ImVec4(0, 0, 0, 0.08f);
|
||||
c[ImGuiCol_TextSelectedBg] = ImVec4(blueH.x, blueH.y, blueH.z, 0.35f);
|
||||
c[ImGuiCol_DragDropTarget] = blue;
|
||||
c[ImGuiCol_NavHighlight] = blue;
|
||||
c[ImGuiCol_NavWindowingHighlight] = ImVec4(0, 0, 0, 0.20f);
|
||||
c[ImGuiCol_NavWindowingDimBg] = ImVec4(0, 0, 0, 0.20f);
|
||||
c[ImGuiCol_ModalWindowDimBg] = ImVec4(0, 0, 0, 0.20f);
|
||||
c[ImGuiCol_PlotLines] = blue;
|
||||
c[ImGuiCol_PlotLinesHovered] = blueH;
|
||||
c[ImGuiCol_PlotHistogram] = blue;
|
||||
c[ImGuiCol_PlotHistogramHovered] = blueH;
|
||||
}
|
||||
184
themes/Solarized.h
Normal file
184
themes/Solarized.h
Normal file
@@ -0,0 +1,184 @@
|
||||
// themes/Solarized.h — Solarized Dark/Light ImGui themes (header-only)
|
||||
#pragma once
|
||||
#include "ThemeHelpers.h"
|
||||
|
||||
|
||||
// Expects to be included from GUITheme.h after <imgui.h> and RGBA() helper
|
||||
|
||||
static void
|
||||
ApplySolarizedDarkTheme()
|
||||
{
|
||||
// Base colors from Ethan Schoonover Solarized
|
||||
const ImVec4 base03 = RGBA(0x002b36);
|
||||
const ImVec4 base02 = RGBA(0x073642);
|
||||
const ImVec4 base01 = RGBA(0x586e75);
|
||||
const ImVec4 base00 = RGBA(0x657b83);
|
||||
const ImVec4 base0 = RGBA(0x839496);
|
||||
const ImVec4 base1 = RGBA(0x93a1a1);
|
||||
const ImVec4 base2 = RGBA(0xeee8d5);
|
||||
const ImVec4 yellow = RGBA(0xb58900);
|
||||
const ImVec4 orange = RGBA(0xcb4b16);
|
||||
const ImVec4 blue = RGBA(0x268bd2);
|
||||
const ImVec4 cyan = RGBA(0x2aa198);
|
||||
|
||||
ImGuiStyle &style = ImGui::GetStyle();
|
||||
style.WindowPadding = ImVec2(8.0f, 8.0f);
|
||||
style.FramePadding = ImVec2(6.0f, 4.0f);
|
||||
style.CellPadding = ImVec2(6.0f, 4.0f);
|
||||
style.ItemSpacing = ImVec2(6.0f, 6.0f);
|
||||
style.ItemInnerSpacing = ImVec2(6.0f, 4.0f);
|
||||
style.ScrollbarSize = 14.0f;
|
||||
style.GrabMinSize = 10.0f;
|
||||
style.WindowRounding = 3.0f;
|
||||
style.FrameRounding = 3.0f;
|
||||
style.PopupRounding = 3.0f;
|
||||
style.GrabRounding = 3.0f;
|
||||
style.TabRounding = 3.0f;
|
||||
style.WindowBorderSize = 1.0f;
|
||||
style.FrameBorderSize = 1.0f;
|
||||
|
||||
ImVec4 *c = style.Colors;
|
||||
c[ImGuiCol_Text] = base0;
|
||||
c[ImGuiCol_TextDisabled] = ImVec4(base01.x, base01.y, base01.z, 1.0f);
|
||||
c[ImGuiCol_WindowBg] = base03;
|
||||
c[ImGuiCol_ChildBg] = base03;
|
||||
c[ImGuiCol_PopupBg] = ImVec4(base02.x, base02.y, base02.z, 0.98f);
|
||||
c[ImGuiCol_Border] = base02;
|
||||
c[ImGuiCol_BorderShadow] = RGBA(0x000000, 0.0f);
|
||||
c[ImGuiCol_FrameBg] = base02;
|
||||
c[ImGuiCol_FrameBgHovered] = base01;
|
||||
c[ImGuiCol_FrameBgActive] = base00;
|
||||
c[ImGuiCol_TitleBg] = base02;
|
||||
c[ImGuiCol_TitleBgActive] = base01;
|
||||
c[ImGuiCol_TitleBgCollapsed] = base02;
|
||||
c[ImGuiCol_MenuBarBg] = base02;
|
||||
c[ImGuiCol_ScrollbarBg] = base02;
|
||||
c[ImGuiCol_ScrollbarGrab] = base01;
|
||||
c[ImGuiCol_ScrollbarGrabHovered] = base00;
|
||||
c[ImGuiCol_ScrollbarGrabActive] = blue;
|
||||
c[ImGuiCol_CheckMark] = cyan;
|
||||
c[ImGuiCol_SliderGrab] = cyan;
|
||||
c[ImGuiCol_SliderGrabActive] = blue;
|
||||
c[ImGuiCol_Button] = base01;
|
||||
c[ImGuiCol_ButtonHovered] = base00;
|
||||
c[ImGuiCol_ButtonActive] = blue;
|
||||
c[ImGuiCol_Header] = base01;
|
||||
c[ImGuiCol_HeaderHovered] = base00;
|
||||
c[ImGuiCol_HeaderActive] = base00;
|
||||
c[ImGuiCol_Separator] = base01;
|
||||
c[ImGuiCol_SeparatorHovered] = base00;
|
||||
c[ImGuiCol_SeparatorActive] = blue;
|
||||
c[ImGuiCol_ResizeGrip] = ImVec4(base1.x, base1.y, base1.z, 0.12f);
|
||||
c[ImGuiCol_ResizeGripHovered] = ImVec4(cyan.x, cyan.y, cyan.z, 0.67f);
|
||||
c[ImGuiCol_ResizeGripActive] = blue;
|
||||
c[ImGuiCol_Tab] = base01;
|
||||
c[ImGuiCol_TabHovered] = base00;
|
||||
c[ImGuiCol_TabActive] = base02;
|
||||
c[ImGuiCol_TabUnfocused] = base01;
|
||||
c[ImGuiCol_TabUnfocusedActive] = base02;
|
||||
c[ImGuiCol_TableHeaderBg] = base01;
|
||||
c[ImGuiCol_TableBorderStrong] = base00;
|
||||
c[ImGuiCol_TableBorderLight] = ImVec4(base00.x, base00.y, base00.z, 0.6f);
|
||||
c[ImGuiCol_TableRowBg] = ImVec4(base02.x, base02.y, base02.z, 0.2f);
|
||||
c[ImGuiCol_TableRowBgAlt] = ImVec4(base02.x, base02.y, base02.z, 0.35f);
|
||||
c[ImGuiCol_TextSelectedBg] = ImVec4(cyan.x, cyan.y, cyan.z, 0.30f);
|
||||
c[ImGuiCol_DragDropTarget] = yellow;
|
||||
c[ImGuiCol_NavHighlight] = blue;
|
||||
c[ImGuiCol_NavWindowingHighlight] = ImVec4(base2.x, base2.y, base2.z, 0.70f);
|
||||
c[ImGuiCol_NavWindowingDimBg] = ImVec4(base03.x, base03.y, base03.z, 0.60f);
|
||||
c[ImGuiCol_ModalWindowDimBg] = ImVec4(base03.x, base03.y, base03.z, 0.60f);
|
||||
c[ImGuiCol_PlotLines] = cyan;
|
||||
c[ImGuiCol_PlotLinesHovered] = blue;
|
||||
c[ImGuiCol_PlotHistogram] = yellow;
|
||||
c[ImGuiCol_PlotHistogramHovered] = orange;
|
||||
}
|
||||
|
||||
|
||||
static inline void
|
||||
ApplySolarizedLightTheme()
|
||||
{
|
||||
// Base colors from Ethan Schoonover Solarized (light variant)
|
||||
const ImVec4 base3 = RGBA(0xfdf6e3);
|
||||
const ImVec4 base2 = RGBA(0xeee8d5);
|
||||
const ImVec4 base1 = RGBA(0x93a1a1);
|
||||
const ImVec4 base0 = RGBA(0x839496);
|
||||
const ImVec4 base00 = RGBA(0x657b83);
|
||||
const ImVec4 base01 = RGBA(0x586e75);
|
||||
const ImVec4 base02 = RGBA(0x073642);
|
||||
const ImVec4 base03 = RGBA(0x002b36);
|
||||
const ImVec4 yellow = RGBA(0xb58900);
|
||||
const ImVec4 orange = RGBA(0xcb4b16);
|
||||
const ImVec4 blue = RGBA(0x268bd2);
|
||||
const ImVec4 cyan = RGBA(0x2aa198);
|
||||
|
||||
ImGuiStyle &style = ImGui::GetStyle();
|
||||
style.WindowPadding = ImVec2(8.0f, 8.0f);
|
||||
style.FramePadding = ImVec2(6.0f, 4.0f);
|
||||
style.CellPadding = ImVec2(6.0f, 4.0f);
|
||||
style.ItemSpacing = ImVec2(6.0f, 6.0f);
|
||||
style.ItemInnerSpacing = ImVec2(6.0f, 4.0f);
|
||||
style.ScrollbarSize = 14.0f;
|
||||
style.GrabMinSize = 10.0f;
|
||||
style.WindowRounding = 3.0f;
|
||||
style.FrameRounding = 3.0f;
|
||||
style.PopupRounding = 3.0f;
|
||||
style.GrabRounding = 3.0f;
|
||||
style.TabRounding = 3.0f;
|
||||
style.WindowBorderSize = 1.0f;
|
||||
style.FrameBorderSize = 1.0f;
|
||||
|
||||
ImVec4 *c = style.Colors;
|
||||
c[ImGuiCol_Text] = base00;
|
||||
c[ImGuiCol_TextDisabled] = ImVec4(base01.x, base01.y, base01.z, 1.0f);
|
||||
c[ImGuiCol_WindowBg] = base3;
|
||||
c[ImGuiCol_ChildBg] = base3;
|
||||
c[ImGuiCol_PopupBg] = ImVec4(base2.x, base2.y, base2.z, 0.98f);
|
||||
c[ImGuiCol_Border] = base1;
|
||||
c[ImGuiCol_BorderShadow] = RGBA(0x000000, 0.0f);
|
||||
c[ImGuiCol_FrameBg] = base2;
|
||||
c[ImGuiCol_FrameBgHovered] = base1;
|
||||
c[ImGuiCol_FrameBgActive] = base0;
|
||||
c[ImGuiCol_TitleBg] = base2;
|
||||
c[ImGuiCol_TitleBgActive] = base1;
|
||||
c[ImGuiCol_TitleBgCollapsed] = base2;
|
||||
c[ImGuiCol_MenuBarBg] = base2;
|
||||
c[ImGuiCol_ScrollbarBg] = base2;
|
||||
c[ImGuiCol_ScrollbarGrab] = base1;
|
||||
c[ImGuiCol_ScrollbarGrabHovered] = base0;
|
||||
c[ImGuiCol_ScrollbarGrabActive] = blue;
|
||||
c[ImGuiCol_CheckMark] = cyan;
|
||||
c[ImGuiCol_SliderGrab] = cyan;
|
||||
c[ImGuiCol_SliderGrabActive] = blue;
|
||||
c[ImGuiCol_Button] = base1;
|
||||
c[ImGuiCol_ButtonHovered] = base0;
|
||||
c[ImGuiCol_ButtonActive] = blue;
|
||||
c[ImGuiCol_Header] = base1;
|
||||
c[ImGuiCol_HeaderHovered] = base0;
|
||||
c[ImGuiCol_HeaderActive] = base0;
|
||||
c[ImGuiCol_Separator] = base1;
|
||||
c[ImGuiCol_SeparatorHovered] = base0;
|
||||
c[ImGuiCol_SeparatorActive] = blue;
|
||||
c[ImGuiCol_ResizeGrip] = ImVec4(base1.x, base1.y, base1.z, 0.12f);
|
||||
c[ImGuiCol_ResizeGripHovered] = ImVec4(cyan.x, cyan.y, cyan.z, 0.67f);
|
||||
c[ImGuiCol_ResizeGripActive] = blue;
|
||||
c[ImGuiCol_Tab] = base1;
|
||||
c[ImGuiCol_TabHovered] = base0;
|
||||
c[ImGuiCol_TabActive] = base2;
|
||||
c[ImGuiCol_TabUnfocused] = base1;
|
||||
c[ImGuiCol_TabUnfocusedActive] = base2;
|
||||
c[ImGuiCol_TableHeaderBg] = base1;
|
||||
c[ImGuiCol_TableBorderStrong] = base0;
|
||||
c[ImGuiCol_TableBorderLight] = ImVec4(base0.x, base0.y, base0.z, 0.6f);
|
||||
c[ImGuiCol_TableRowBg] = ImVec4(base02.x, base02.y, base02.z, 0.2f);
|
||||
c[ImGuiCol_TableRowBgAlt] = ImVec4(base02.x, base02.y, base02.z, 0.35f);
|
||||
c[ImGuiCol_TextSelectedBg] = ImVec4(cyan.x, cyan.y, cyan.z, 0.30f);
|
||||
c[ImGuiCol_DragDropTarget] = yellow;
|
||||
c[ImGuiCol_NavHighlight] = blue;
|
||||
c[ImGuiCol_NavWindowingHighlight] = ImVec4(base2.x, base2.y, base2.z, 0.70f);
|
||||
c[ImGuiCol_NavWindowingDimBg] = ImVec4(base03.x, base03.y, base03.z, 0.60f);
|
||||
c[ImGuiCol_ModalWindowDimBg] = ImVec4(base03.x, base03.y, base03.z, 0.60f);
|
||||
c[ImGuiCol_PlotLines] = cyan;
|
||||
c[ImGuiCol_PlotLinesHovered] = blue;
|
||||
c[ImGuiCol_PlotHistogram] = yellow;
|
||||
c[ImGuiCol_PlotHistogramHovered] = orange;
|
||||
}
|
||||
17
themes/ThemeHelpers.h
Normal file
17
themes/ThemeHelpers.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef KTE_THEMEHELPERS_H
|
||||
#define KTE_THEMEHELPERS_H
|
||||
|
||||
#include "imgui.h"
|
||||
|
||||
// Small helper to convert packed RGB (0xRRGGBB) + optional alpha to ImVec4
|
||||
static ImVec4
|
||||
RGBA(const unsigned int rgb, float a = 1.0f)
|
||||
{
|
||||
const float r = static_cast<float>(rgb >> 16 & 0xFF) / 255.0f;
|
||||
const float g = static_cast<float>(rgb >> 8 & 0xFF) / 255.0f;
|
||||
const float b = static_cast<float>(rgb & 0xFF) / 255.0f;
|
||||
return {r, g, b, a};
|
||||
}
|
||||
|
||||
|
||||
#endif //KTE_THEMEHELPERS_H
|
||||
Reference in New Issue
Block a user