Slight theming tweaks

Minor improvements to small detail:
No child border on console on default theme (this is invisible).
Tweaked first use size and min size where by default the text would always perfectly align between ScrollY min and max.
This commit is contained in:
Kawe Mazidjatari 2022-06-24 12:45:47 +02:00
parent add5c577ff
commit 2eda8235b7
3 changed files with 9 additions and 5 deletions

View File

@ -92,6 +92,11 @@ void CBrowser::Draw(void)
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, m_flFadeAlpha); nVars++;
ImGui::PushStyleVar(ImGuiStyleVar_WindowMinSize, ImVec2(750, 510)); nVars++;
if (!m_bModernTheme)
{
ImGui::PushStyleVar(ImGuiStyleVar_ChildBorderSize, 1.0f); nVars++;
}
if (!ImGui::Begin(m_pszBrowserTitle, &m_bActivate))
{
ImGui::End();

View File

@ -95,11 +95,10 @@ void CConsole::Draw(void)
}
else
{
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2{ 4.f, 6.f }); nVars++;
ImGui::PushStyleVar(ImGuiStyleVar_ChildBorderSize, 1.0f); nVars++;
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2{ 6.f, 6.f }); nVars++;
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, m_flFadeAlpha); nVars++;
}
ImGui::PushStyleVar(ImGuiStyleVar_WindowMinSize, ImVec2(618, 518)); nVars++;
ImGui::PushStyleVar(ImGuiStyleVar_WindowMinSize, ImVec2(618, 524)); nVars++;
BasePanel();
ImGui::PopStyleVar(nVars);
@ -829,7 +828,7 @@ void CConsole::SetStyleVar(void)
m_bModernTheme = true;
}
ImGui::SetNextWindowSize(ImVec2(1200, 518), ImGuiCond_FirstUseEver);
ImGui::SetNextWindowSize(ImVec2(1200, 524), ImGuiCond_FirstUseEver);
ImGui::SetWindowPos(ImVec2(-1000, 50), ImGuiCond_FirstUseEver);
}

View File

@ -256,7 +256,7 @@ int ImGuiConfig::InitStyle() const
style.WindowBorderSize = 1.0f;
style.FrameBorderSize = 1.0f;
style.ChildBorderSize = 1.0f;
style.ChildBorderSize = 0.0f;
style.PopupBorderSize = 1.0f;
style.TabBorderSize = 1.0f;