ImGui theme improvements

This commit is contained in:
Kawe Mazidjatari 2022-06-20 13:05:50 +02:00
parent 44157bdce4
commit 33aebfb89d
4 changed files with 24 additions and 17 deletions

View File

@ -736,6 +736,7 @@ void CBrowser::SetStyleVar(void)
{
colors[ImGuiCol_Text] = ImVec4(0.81f, 0.81f, 0.81f, 1.00f);
colors[ImGuiCol_TextDisabled] = ImVec4(0.56f, 0.56f, 0.56f, 1.00f);
colors[ImGuiCol_TextSelectedBg] = ImVec4(0.13f, 0.38f, 0.63f, 0.50f);
colors[ImGuiCol_WindowBg] = ImVec4(0.27f, 0.27f, 0.27f, 1.00f);
colors[ImGuiCol_ChildBg] = ImVec4(0.00f, 0.00f, 0.00f, 1.00f);
colors[ImGuiCol_PopupBg] = ImVec4(0.27f, 0.27f, 0.27f, 1.00f);
@ -786,12 +787,13 @@ void CBrowser::SetStyleVar(void)
}
else
{
colors[ImGuiCol_WindowBg] = ImVec4(0.11f, 0.13f, 0.17f, 1.00f);
colors[ImGuiCol_ChildBg] = ImVec4(0.02f, 0.04f, 0.06f, 1.00f);
colors[ImGuiCol_TextSelectedBg] = ImVec4(0.13f, 0.38f, 0.63f, 0.50f);
colors[ImGuiCol_WindowBg] = ImVec4(0.12f, 0.14f, 0.19f, 1.00f);
colors[ImGuiCol_ChildBg] = ImVec4(0.03f, 0.05f, 0.09f, 1.00f);
colors[ImGuiCol_PopupBg] = ImVec4(0.11f, 0.13f, 0.17f, 1.00f);
colors[ImGuiCol_Border] = ImVec4(0.41f, 0.41f, 0.41f, 0.50f);
colors[ImGuiCol_Border] = ImVec4(0.61f, 0.61f, 0.61f, 0.50f);
colors[ImGuiCol_BorderShadow] = ImVec4(0.04f, 0.04f, 0.04f, 0.00f);
colors[ImGuiCol_FrameBg] = ImVec4(0.02f, 0.04f, 0.06f, 1.00f);
colors[ImGuiCol_FrameBg] = ImVec4(0.03f, 0.05f, 0.09f, 1.00f);
colors[ImGuiCol_FrameBgHovered] = ImVec4(0.04f, 0.06f, 0.10f, 1.00f);
colors[ImGuiCol_FrameBgActive] = ImVec4(0.04f, 0.07f, 0.12f, 1.00f);
colors[ImGuiCol_TitleBg] = ImVec4(0.26f, 0.51f, 0.78f, 1.00f);
@ -810,7 +812,7 @@ void CBrowser::SetStyleVar(void)
colors[ImGuiCol_HeaderHovered] = ImVec4(0.38f, 0.53f, 0.53f, 1.00f);
colors[ImGuiCol_HeaderActive] = ImVec4(0.41f, 0.56f, 0.57f, 1.00f);
colors[ImGuiCol_Separator] = ImVec4(0.53f, 0.53f, 0.57f, 0.00f);
colors[ImGuiCol_ResizeGrip] = ImVec4(0.41f, 0.41f, 0.41f, 0.50f);
colors[ImGuiCol_ResizeGrip] = ImVec4(0.81f, 0.81f, 0.81f, 0.50f);
colors[ImGuiCol_Tab] = ImVec4(0.31f, 0.43f, 0.43f, 1.00f);
colors[ImGuiCol_TabHovered] = ImVec4(0.38f, 0.53f, 0.53f, 1.00f);
colors[ImGuiCol_TabActive] = ImVec4(0.41f, 0.56f, 0.57f, 1.00f);

View File

@ -821,6 +821,7 @@ void CConsole::SetStyleVar(void)
{
colors[ImGuiCol_Text] = ImVec4(0.81f, 0.81f, 0.81f, 1.00f);
colors[ImGuiCol_TextDisabled] = ImVec4(0.56f, 0.56f, 0.56f, 1.00f);
colors[ImGuiCol_TextSelectedBg] = ImVec4(0.13f, 0.38f, 0.63f, 0.50f);
colors[ImGuiCol_WindowBg] = ImVec4(0.27f, 0.27f, 0.27f, 1.00f);
colors[ImGuiCol_ChildBg] = ImVec4(0.00f, 0.00f, 0.00f, 1.00f);
colors[ImGuiCol_PopupBg] = ImVec4(0.27f, 0.27f, 0.27f, 1.00f);
@ -871,12 +872,13 @@ void CConsole::SetStyleVar(void)
}
else
{
colors[ImGuiCol_WindowBg] = ImVec4(0.11f, 0.13f, 0.17f, 1.00f);
colors[ImGuiCol_ChildBg] = ImVec4(0.02f, 0.04f, 0.06f, 1.00f);
colors[ImGuiCol_TextSelectedBg] = ImVec4(0.13f, 0.38f, 0.63f, 0.50f);
colors[ImGuiCol_WindowBg] = ImVec4(0.12f, 0.14f, 0.19f, 1.00f);
colors[ImGuiCol_ChildBg] = ImVec4(0.03f, 0.05f, 0.09f, 1.00f);
colors[ImGuiCol_PopupBg] = ImVec4(0.11f, 0.13f, 0.17f, 1.00f);
colors[ImGuiCol_Border] = ImVec4(0.41f, 0.41f, 0.41f, 0.50f);
colors[ImGuiCol_Border] = ImVec4(0.61f, 0.61f, 0.61f, 0.50f);
colors[ImGuiCol_BorderShadow] = ImVec4(0.04f, 0.04f, 0.04f, 0.00f);
colors[ImGuiCol_FrameBg] = ImVec4(0.02f, 0.04f, 0.06f, 1.00f);
colors[ImGuiCol_FrameBg] = ImVec4(0.03f, 0.05f, 0.09f, 1.00f);
colors[ImGuiCol_FrameBgHovered] = ImVec4(0.04f, 0.06f, 0.10f, 1.00f);
colors[ImGuiCol_FrameBgActive] = ImVec4(0.04f, 0.07f, 0.12f, 1.00f);
colors[ImGuiCol_TitleBg] = ImVec4(0.26f, 0.51f, 0.78f, 1.00f);
@ -895,7 +897,7 @@ void CConsole::SetStyleVar(void)
colors[ImGuiCol_HeaderHovered] = ImVec4(0.38f, 0.53f, 0.53f, 1.00f);
colors[ImGuiCol_HeaderActive] = ImVec4(0.41f, 0.56f, 0.57f, 1.00f);
colors[ImGuiCol_Separator] = ImVec4(0.53f, 0.53f, 0.57f, 0.00f);
colors[ImGuiCol_ResizeGrip] = ImVec4(0.41f, 0.41f, 0.41f, 0.50f);
colors[ImGuiCol_ResizeGrip] = ImVec4(0.81f, 0.81f, 0.81f, 0.50f);
colors[ImGuiCol_Tab] = ImVec4(0.31f, 0.43f, 0.43f, 1.00f);
colors[ImGuiCol_TabHovered] = ImVec4(0.38f, 0.53f, 0.53f, 1.00f);
colors[ImGuiCol_TabActive] = ImVec4(0.41f, 0.56f, 0.57f, 1.00f);

View File

@ -781,7 +781,7 @@ void CTextLogger::Render()
{
ImVec2 vstart(lineStartScreenPos.x + m_flTextStart + sstart, lineStartScreenPos.y);
ImVec2 vend(lineStartScreenPos.x + m_flTextStart + ssend, lineStartScreenPos.y + m_CharAdvance.y);
drawList->AddRectFilled(vstart, vend, 0x80a06020); // COLOR
drawList->AddRectFilled(vstart, vend, ImGui::GetColorU32(ImGuiCol_TextSelectedBg));
}
if (m_State.m_CursorPosition.m_nLine == lineNo)
@ -790,12 +790,12 @@ void CTextLogger::Render()
ImVec2 start = ImVec2(lineStartScreenPos.x + scrollX, lineStartScreenPos.y);
// Highlight the current line (where the cursor is)
if (!HasSelection())
{
auto end = ImVec2(start.x + contentSize.x + scrollX, start.y + m_CharAdvance.y);
drawList->AddRectFilled(start, end, 0x40000000);
drawList->AddRect(start, end, 0x40000000, 1.0f);
}
//if (!HasSelection())
//{
// auto end = ImVec2(start.x + contentSize.x + scrollX, start.y + m_CharAdvance.y);
// drawList->AddRectFilled(start, end, 0x80a06020);
// drawList->AddRect(start, end, 0x80a06020, 1.0f);
//}
// Render the cursor
if (focused)

View File

@ -4691,7 +4691,10 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
ImRect rect(rect_pos + ImVec2(0.0f, bg_offy_up - g.FontSize), rect_pos + ImVec2(rect_size.x, bg_offy_dn));
rect.ClipWith(clip_rect);
if (rect.Overlaps(clip_rect))
{
draw_window->DrawList->AddRect(rect.Min, rect.Max, bg_color, 1.0f);
draw_window->DrawList->AddRectFilled(rect.Min, rect.Max, bg_color);
}
}
rect_pos.x = draw_pos.x - draw_scroll.x;
rect_pos.y += g.FontSize;