|
| 1 | +#pragma once |
| 2 | + |
| 3 | +#include "theme.h" |
| 4 | + |
| 5 | +class LightTheme : public Theme |
| 6 | +{ |
| 7 | +public: |
| 8 | + void apply() const override |
| 9 | + { |
| 10 | + ImGui::StyleColorsLight(); |
| 11 | + ImGuiStyle& style = ImGui::GetStyle(); |
| 12 | + |
| 13 | + // Layout |
| 14 | + style.WindowPadding = ImVec2(15, 15); |
| 15 | + style.WindowRounding = 5.0f; |
| 16 | + style.FramePadding = ImVec2(5, 5); |
| 17 | + style.FrameRounding = 4.0f; |
| 18 | + style.ItemSpacing = ImVec2(12, 6); |
| 19 | + style.ItemInnerSpacing = ImVec2(8, 4); |
| 20 | + style.IndentSpacing = 25.0f; |
| 21 | + style.ScrollbarSize = 15.0f; |
| 22 | + style.ScrollbarRounding = 9.0f; |
| 23 | + style.GrabMinSize = 5.0f; |
| 24 | + style.GrabRounding = 3.0f; |
| 25 | + |
| 26 | + // Colors |
| 27 | + ImVec4* colors = style.Colors; |
| 28 | + colors[ImGuiCol_Text] = ImVec4(0.10f, 0.10f, 0.10f, 1.00f); |
| 29 | + colors[ImGuiCol_TextDisabled] = ImVec4(0.50f, 0.50f, 0.50f, 1.00f); |
| 30 | + colors[ImGuiCol_WindowBg] = ImVec4(0.95f, 0.96f, 0.98f, 1.00f); |
| 31 | + colors[ImGuiCol_ChildBg] = ImVec4(0.98f, 0.98f, 0.98f, 1.00f); |
| 32 | + colors[ImGuiCol_PopupBg] = ImVec4(0.94f, 0.94f, 0.94f, 1.00f); |
| 33 | + colors[ImGuiCol_Border] = ImVec4(0.70f, 0.70f, 0.70f, 0.50f); |
| 34 | + colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f); |
| 35 | + colors[ImGuiCol_FrameBg] = ImVec4(0.90f, 0.90f, 0.90f, 1.00f); |
| 36 | + colors[ImGuiCol_FrameBgHovered] = ImVec4(0.75f, 0.75f, 0.75f, 1.00f); |
| 37 | + colors[ImGuiCol_FrameBgActive] = ImVec4(0.65f, 0.65f, 0.65f, 1.00f); |
| 38 | + colors[ImGuiCol_TitleBg] = ImVec4(0.86f, 0.86f, 0.90f, 1.00f); |
| 39 | + colors[ImGuiCol_TitleBgActive] = ImVec4(0.75f, 0.75f, 0.80f, 1.00f); |
| 40 | + colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.95f, 0.95f, 0.95f, 0.50f); |
| 41 | + colors[ImGuiCol_MenuBarBg] = ImVec4(0.92f, 0.92f, 0.95f, 1.00f); |
| 42 | + colors[ImGuiCol_ScrollbarBg] = ImVec4(0.95f, 0.95f, 0.96f, 1.00f); |
| 43 | + colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.75f, 0.75f, 0.80f, 0.60f); |
| 44 | + colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.65f, 0.65f, 0.70f, 0.80f); |
| 45 | + colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.60f, 0.60f, 0.65f, 1.00f); |
| 46 | + colors[ImGuiCol_CheckMark] = ImVec4(0.25f, 0.50f, 0.75f, 1.00f); |
| 47 | + colors[ImGuiCol_SliderGrab] = ImVec4(0.60f, 0.60f, 0.70f, 0.50f); |
| 48 | + colors[ImGuiCol_SliderGrabActive] = ImVec4(0.25f, 0.50f, 0.75f, 1.00f); |
| 49 | + colors[ImGuiCol_Button] = ImVec4(0.75f, 0.75f, 0.85f, 1.00f); |
| 50 | + colors[ImGuiCol_ButtonHovered] = ImVec4(0.85f, 0.85f, 0.95f, 1.00f); |
| 51 | + colors[ImGuiCol_ButtonActive] = ImVec4(0.65f, 0.65f, 0.90f, 1.00f); |
| 52 | + colors[ImGuiCol_Header] = ImVec4(0.80f, 0.80f, 0.90f, 1.00f); |
| 53 | + colors[ImGuiCol_HeaderHovered] = ImVec4(0.85f, 0.85f, 0.95f, 1.00f); |
| 54 | + colors[ImGuiCol_HeaderActive] = ImVec4(0.65f, 0.65f, 0.85f, 1.00f); |
| 55 | + colors[ImGuiCol_Separator] = ImVec4(0.60f, 0.60f, 0.70f, 1.00f); |
| 56 | + colors[ImGuiCol_SeparatorHovered] = ImVec4(0.30f, 0.60f, 0.90f, 1.00f); |
| 57 | + colors[ImGuiCol_SeparatorActive] = ImVec4(0.10f, 0.50f, 0.80f, 1.00f); |
| 58 | + colors[ImGuiCol_ResizeGrip] = ImVec4(0.90f, 0.90f, 0.90f, 0.30f); |
| 59 | + colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.60f, 0.60f, 0.70f, 0.60f); |
| 60 | + colors[ImGuiCol_ResizeGripActive] = ImVec4(0.30f, 0.60f, 0.90f, 1.00f); |
| 61 | + colors[ImGuiCol_Tab] = ImVec4(0.80f, 0.80f, 0.85f, 1.00f); |
| 62 | + colors[ImGuiCol_TabHovered] = ImVec4(0.90f, 0.90f, 0.95f, 1.00f); |
| 63 | + colors[ImGuiCol_TabActive] = ImVec4(0.70f, 0.70f, 0.90f, 1.00f); |
| 64 | + colors[ImGuiCol_TabUnfocused] = ImVec4(0.92f, 0.92f, 0.92f, 0.90f); |
| 65 | + colors[ImGuiCol_TabUnfocusedActive] = ImVec4(0.75f, 0.75f, 0.85f, 1.00f); |
| 66 | + colors[ImGuiCol_DockingPreview] = ImVec4(0.30f, 0.60f, 0.90f, 0.70f); |
| 67 | + colors[ImGuiCol_DockingEmptyBg] = ImVec4(0.94f, 0.94f, 0.94f, 1.00f); |
| 68 | + colors[ImGuiCol_PlotLines] = ImVec4(0.35f, 0.35f, 0.35f, 1.00f); |
| 69 | + colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.25f, 0.50f, 0.75f, 1.00f); |
| 70 | + colors[ImGuiCol_PlotHistogram] = ImVec4(0.30f, 0.45f, 0.60f, 1.00f); |
| 71 | + colors[ImGuiCol_PlotHistogramHovered] = ImVec4(0.25f, 0.50f, 0.75f, 1.00f); |
| 72 | + colors[ImGuiCol_TableHeaderBg] = ImVec4(0.85f, 0.85f, 0.90f, 1.00f); |
| 73 | + colors[ImGuiCol_TableBorderStrong] = ImVec4(0.70f, 0.70f, 0.75f, 1.00f); |
| 74 | + colors[ImGuiCol_TableBorderLight] = ImVec4(0.85f, 0.85f, 0.90f, 1.00f); |
| 75 | + colors[ImGuiCol_TableRowBg] = ImVec4(1.00f, 1.00f, 1.00f, 0.00f); |
| 76 | + colors[ImGuiCol_TableRowBgAlt] = ImVec4(0.95f, 0.95f, 0.95f, 0.30f); |
| 77 | + colors[ImGuiCol_TextSelectedBg] = ImVec4(0.30f, 0.60f, 0.90f, 0.50f); |
| 78 | + colors[ImGuiCol_DragDropTarget] = ImVec4(0.00f, 0.60f, 1.00f, 0.90f); |
| 79 | + colors[ImGuiCol_NavHighlight] = ImVec4(0.30f, 0.60f, 0.90f, 1.00f); |
| 80 | + colors[ImGuiCol_NavWindowingHighlight] = ImVec4(0.30f, 0.60f, 0.90f, 0.70f); |
| 81 | + colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.20f); |
| 82 | + colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.90f, 0.90f, 0.90f, 0.60f); |
| 83 | + } |
| 84 | + |
| 85 | + String getName() const override |
| 86 | + { |
| 87 | + return "Light"; |
| 88 | + } |
| 89 | +}; |
0 commit comments