Adding TitleBgActive color - still issues with popups/menus (#253)
This commit is contained in:
parent
0e3198edc2
commit
47826830af
@ -623,8 +623,9 @@ ImGuiStyle::ImGuiStyle()
|
|||||||
Colors[ImGuiCol_FrameBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.30f); // Background of checkbox, radio button, plot, slider, text input
|
Colors[ImGuiCol_FrameBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.30f); // Background of checkbox, radio button, plot, slider, text input
|
||||||
Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.90f, 0.80f, 0.80f, 0.40f);
|
Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.90f, 0.80f, 0.80f, 0.40f);
|
||||||
Colors[ImGuiCol_FrameBgActive] = ImVec4(0.90f, 0.65f, 0.65f, 0.45f);
|
Colors[ImGuiCol_FrameBgActive] = ImVec4(0.90f, 0.65f, 0.65f, 0.45f);
|
||||||
Colors[ImGuiCol_TitleBg] = ImVec4(0.50f, 0.50f, 1.00f, 0.45f);
|
Colors[ImGuiCol_TitleBg] = ImVec4(0.50f, 0.50f, 1.00f, 0.40f);
|
||||||
Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.40f, 0.40f, 0.80f, 0.20f);
|
Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.40f, 0.40f, 0.80f, 0.20f);
|
||||||
|
Colors[ImGuiCol_TitleBgActive] = ImVec4(0.50f, 0.50f, 1.00f, 0.55f);
|
||||||
Colors[ImGuiCol_MenuBarBg] = ImVec4(0.40f, 0.40f, 0.55f, 0.60f);
|
Colors[ImGuiCol_MenuBarBg] = ImVec4(0.40f, 0.40f, 0.55f, 0.60f);
|
||||||
Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.40f, 0.40f, 0.80f, 0.15f);
|
Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.40f, 0.40f, 0.80f, 0.15f);
|
||||||
Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.40f, 0.40f, 0.80f, 0.30f);
|
Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.40f, 0.40f, 0.80f, 0.30f);
|
||||||
@ -3915,7 +3916,7 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_
|
|||||||
|
|
||||||
// Title bar
|
// Title bar
|
||||||
if (!(flags & ImGuiWindowFlags_NoTitleBar))
|
if (!(flags & ImGuiWindowFlags_NoTitleBar))
|
||||||
window->DrawList->AddRectFilled(title_bar_rect.GetTL(), title_bar_rect.GetBR(), window->Color(ImGuiCol_TitleBg), window_rounding, 1|2);
|
window->DrawList->AddRectFilled(title_bar_rect.GetTL(), title_bar_rect.GetBR(), window->Color((g.FocusedWindow && window->RootWindow == g.FocusedWindow->RootWindow) ? ImGuiCol_TitleBgActive : ImGuiCol_TitleBg), window_rounding, 1|2);
|
||||||
|
|
||||||
// Menu bar
|
// Menu bar
|
||||||
if (flags & ImGuiWindowFlags_MenuBar)
|
if (flags & ImGuiWindowFlags_MenuBar)
|
||||||
@ -4413,6 +4414,7 @@ const char* ImGui::GetStyleColName(ImGuiCol idx)
|
|||||||
case ImGuiCol_FrameBgActive: return "FrameBgActive";
|
case ImGuiCol_FrameBgActive: return "FrameBgActive";
|
||||||
case ImGuiCol_TitleBg: return "TitleBg";
|
case ImGuiCol_TitleBg: return "TitleBg";
|
||||||
case ImGuiCol_TitleBgCollapsed: return "TitleBgCollapsed";
|
case ImGuiCol_TitleBgCollapsed: return "TitleBgCollapsed";
|
||||||
|
case ImGuiCol_TitleBgActive: return "TitleBgActive";
|
||||||
case ImGuiCol_MenuBarBg: return "MenuBarBg";
|
case ImGuiCol_MenuBarBg: return "MenuBarBg";
|
||||||
case ImGuiCol_ScrollbarBg: return "ScrollbarBg";
|
case ImGuiCol_ScrollbarBg: return "ScrollbarBg";
|
||||||
case ImGuiCol_ScrollbarGrab: return "ScrollbarGrab";
|
case ImGuiCol_ScrollbarGrab: return "ScrollbarGrab";
|
||||||
|
3
imgui.h
3
imgui.h
@ -1,4 +1,4 @@
|
|||||||
// ImGui library v1.42
|
// ImGui library v1.42 wip
|
||||||
// See .cpp file for documentation.
|
// See .cpp file for documentation.
|
||||||
// See ImGui::ShowTestWindow() for sample code.
|
// See ImGui::ShowTestWindow() for sample code.
|
||||||
// Read 'Programmer guide' in .cpp for notes on how to setup ImGui in your codebase.
|
// Read 'Programmer guide' in .cpp for notes on how to setup ImGui in your codebase.
|
||||||
@ -499,6 +499,7 @@ enum ImGuiCol_
|
|||||||
ImGuiCol_FrameBgActive,
|
ImGuiCol_FrameBgActive,
|
||||||
ImGuiCol_TitleBg,
|
ImGuiCol_TitleBg,
|
||||||
ImGuiCol_TitleBgCollapsed,
|
ImGuiCol_TitleBgCollapsed,
|
||||||
|
ImGuiCol_TitleBgActive,
|
||||||
ImGuiCol_MenuBarBg,
|
ImGuiCol_MenuBarBg,
|
||||||
ImGuiCol_ScrollbarBg,
|
ImGuiCol_ScrollbarBg,
|
||||||
ImGuiCol_ScrollbarGrab,
|
ImGuiCol_ScrollbarGrab,
|
||||||
|
Loading…
Reference in New Issue
Block a user