Fullscreen: Light mode corrections

This commit is contained in:
Stenzek
2023-09-20 00:09:31 +10:00
parent 745448f5a6
commit 3a47c1eb52
4 changed files with 31 additions and 44 deletions

View File

@ -73,8 +73,8 @@ ImVec4 UIPrimaryTextColor;
ImVec4 UITextHighlightColor;
ImVec4 UIPrimaryLineColor;
ImVec4 UISecondaryColor;
ImVec4 UISecondaryLightColor;
ImVec4 UISecondaryDarkColor;
ImVec4 UISecondaryWeakColor;
ImVec4 UISecondaryStrongColor;
ImVec4 UISecondaryTextColor;
static u32 s_menu_button_index = 0;
@ -566,20 +566,6 @@ void ImGuiFullscreen::PopPrimaryColor()
ImGui::PopStyleColor(5);
}
void ImGuiFullscreen::PushSecondaryColor()
{
ImGui::PushStyleColor(ImGuiCol_Text, UISecondaryTextColor);
ImGui::PushStyleColor(ImGuiCol_Button, UISecondaryDarkColor);
ImGui::PushStyleColor(ImGuiCol_ButtonActive, UISecondaryColor);
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, UISecondaryLightColor);
ImGui::PushStyleColor(ImGuiCol_Border, UISecondaryLightColor);
}
void ImGuiFullscreen::PopSecondaryColor()
{
ImGui::PopStyleColor(5);
}
bool ImGuiFullscreen::BeginFullscreenColumns(const char* title, float pos_y, bool expand_to_screen_width)
{
ImGui::SetNextWindowPos(ImVec2(expand_to_screen_width ? 0.0f : g_layout_padding_left, pos_y));
@ -1162,7 +1148,7 @@ bool ImGuiFullscreen::ToggleButton(const char* title, const char* summary, bool*
}
else
{
col_bg = ImGui::GetColorU32(ImLerp(HEX_TO_IMVEC4(0x8C8C8C, 0xff), UISecondaryLightColor, t));
col_bg = ImGui::GetColorU32(ImLerp(HEX_TO_IMVEC4(0x8C8C8C, 0xff), UISecondaryStrongColor, t));
col_knob = IM_COL32(255, 255, 255, 255);
}
@ -1241,10 +1227,10 @@ bool ImGuiFullscreen::ThreeWayToggleButton(const char* title, const char* summar
col_bg = IM_COL32(0x75, 0x75, 0x75, 0xff);
else if (hovered)
col_bg = ImGui::GetColorU32(ImLerp(v->has_value() ? HEX_TO_IMVEC4(0xf05100, 0xff) : HEX_TO_IMVEC4(0x9e9e9e, 0xff),
UISecondaryLightColor, color_t));
UISecondaryStrongColor, color_t));
else
col_bg = ImGui::GetColorU32(ImLerp(v->has_value() ? HEX_TO_IMVEC4(0xc45100, 0xff) : HEX_TO_IMVEC4(0x757575, 0xff),
UISecondaryLightColor, color_t));
UISecondaryStrongColor, color_t));
dl->AddRectFilled(toggle_pos, ImVec2(toggle_pos.x + toggle_width, toggle_pos.y + toggle_height), col_bg,
toggle_height * 0.5f);
@ -1484,7 +1470,8 @@ bool ImGuiFullscreen::EnumChoiceButtonImpl(const char* title, const char* summar
void ImGuiFullscreen::DrawShadowedText(ImDrawList* dl, ImFont* font, const ImVec2& pos, u32 col, const char* text,
const char* text_end /*= nullptr*/, float wrap_width /*= 0.0f*/)
{
dl->AddText(font, font->FontSize, pos + LayoutScale(1.0f, 1.0f), IM_COL32(0, 0, 0, 100), text, text_end, wrap_width);
dl->AddText(font, font->FontSize, pos + LayoutScale(1.0f, 1.0f),
s_light_theme ? IM_COL32(255, 255, 255, 100) : IM_COL32(0, 0, 0, 100), text, text_end, wrap_width);
dl->AddText(font, font->FontSize, pos, col, text, text_end, wrap_width);
}
@ -2356,7 +2343,7 @@ void ImGuiFullscreen::DrawBackgroundProgressDialogs(ImVec2& position, float spac
const float window_height = LayoutScale(75.0f);
ImGui::PushStyleColor(ImGuiCol_WindowBg, UIPrimaryDarkColor);
ImGui::PushStyleColor(ImGuiCol_PlotHistogram, UISecondaryLightColor);
ImGui::PushStyleColor(ImGuiCol_PlotHistogram, UISecondaryStrongColor);
ImGui::PushStyleVar(ImGuiStyleVar_PopupRounding, LayoutScale(4.0f));
ImGui::PushStyleVar(ImGuiStyleVar_PopupBorderSize, LayoutScale(1.0f));
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, LayoutScale(10.0f, 10.0f));
@ -2679,8 +2666,8 @@ void ImGuiFullscreen::SetTheme(bool light)
UITextHighlightColor = HEX_TO_IMVEC4(0x90caf9, 0xff);
UIPrimaryLineColor = HEX_TO_IMVEC4(0xffffff, 0xff);
UISecondaryColor = HEX_TO_IMVEC4(0x0d47a1, 0xff);
UISecondaryLightColor = HEX_TO_IMVEC4(0x63a4ff, 0xff);
UISecondaryDarkColor = HEX_TO_IMVEC4(0x002171, 0xff);
UISecondaryStrongColor = HEX_TO_IMVEC4(0x63a4ff, 0xff);
UISecondaryWeakColor = HEX_TO_IMVEC4(0x002171, 0xff);
UISecondaryTextColor = HEX_TO_IMVEC4(0xffffff, 0xff);
}
else
@ -2698,8 +2685,8 @@ void ImGuiFullscreen::SetTheme(bool light)
UITextHighlightColor = HEX_TO_IMVEC4(0x8e8e8e, 0xff);
UIPrimaryLineColor = HEX_TO_IMVEC4(0x000000, 0xff);
UISecondaryColor = HEX_TO_IMVEC4(0x3d5afe, 0xff);
UISecondaryLightColor = HEX_TO_IMVEC4(0xc0cfff, 0xff);
UISecondaryDarkColor = HEX_TO_IMVEC4(0x0031ca, 0xff);
UISecondaryStrongColor = HEX_TO_IMVEC4(0x0031ca, 0xff);
UISecondaryWeakColor = HEX_TO_IMVEC4(0xc0cfff, 0xff);
UISecondaryTextColor = HEX_TO_IMVEC4(0x000000, 0xff);
}
}