FullscreenUI: Disable text shadows in light themes

Signed-off-by: SternXD <stern@sidestore.io>
This commit is contained in:
SternXD authored and lightningterror committed 2026-10-23 12:46:22 +02:00
1 parent 083490daeb
commit b9e8ccffe5
3 files changed
+17 -3

No files matched your search

+1
View File
@@ -136,6 +136,7 @@ using ImGuiFullscreen::UISecondaryStrongColor;
using ImGuiFullscreen::UISecondaryTextColor;
using ImGuiFullscreen::UISecondaryWeakColor;
using ImGuiFullscreen::UITextHighlightColor;
using ImGuiFullscreen::UITextShadowColor;
using ImGuiFullscreen::WantsToCloseMenu;
namespace FullscreenUI
+14 -2
View File
@@ -79,6 +79,7 @@ namespace ImGuiFullscreen
ImVec4 UIPrimaryLightColor;
ImVec4 UIPrimaryDarkColor;
ImVec4 UIPrimaryTextColor;
ImVec4 UITextShadowColor;
ImVec4 UITextHighlightColor;
ImVec4 UIPrimaryLineColor;
ImVec4 UISecondaryColor;
@@ -1185,7 +1186,7 @@ void ImGuiFullscreen::RenderTextClippedWithShadow(const ImVec2& pos_min, const I
const ImVec2& clip_max = clip_rect ? clip_rect->Max : pos_max;
dl->PushClipRect(clip_min, clip_max, true);
AddTextWithShadow(dl, std::pair<ImFont*, float>(font, font_size), pos, ImGui::GetColorU32(ImGuiCol_Text), text, text_end, 0.0f, nullptr,
IM_COL32(0, 0, 0, 64), true);
ImGui::GetColorU32(UITextShadowColor), true);
dl->PopClipRect();
}
@@ -3337,7 +3338,7 @@ void ImGuiFullscreen::DrawToast()
ImDrawList* dl = ImGui::GetForegroundDrawList();
dl->AddRectFilled(box_pos, box_pos + box_size, ImGui::GetColorU32(ModAlpha(UIPrimaryColor, alpha)), padding);
const u32 shadow_col = IM_COL32(0, 0, 0, static_cast<int>(64.0f * alpha));
const u32 shadow_col = ImGui::GetColorU32(MulAlpha(UITextShadowColor, alpha));
if (!s_toast_title.empty())
{
const ImVec2 title_pos = box_pos + ImVec2(padding, padding + (comb_size.y - title_size.y) * 0.5f);
@@ -3368,6 +3369,7 @@ void ImGuiFullscreen::SetTheme(std::string_view theme)
UIPrimaryLightColor = HEX_TO_IMVEC4(0x484848, 0xff);
UIPrimaryDarkColor = HEX_TO_IMVEC4(0x000000, 0xff);
UIPrimaryTextColor = HEX_TO_IMVEC4(0xffffff, 0xff);
UITextShadowColor = HEX_TO_IMVEC4(0x000000, 0x40);
UIDisabledColor = HEX_TO_IMVEC4(0xaaaaaa, 0xff);
UITextHighlightColor = HEX_TO_IMVEC4(0x90caf9, 0xff);
UIPrimaryLineColor = HEX_TO_IMVEC4(0xffffff, 0xff);
@@ -3387,6 +3389,7 @@ void ImGuiFullscreen::SetTheme(std::string_view theme)
UIPrimaryLightColor = HEX_TO_IMVEC4(0x235cd9, 0xff);
UIPrimaryDarkColor = HEX_TO_IMVEC4(0x1d2953, 0xff);
UIPrimaryTextColor = HEX_TO_IMVEC4(0xffffff, 0xff);
UITextShadowColor = HEX_TO_IMVEC4(0x000000, 0x00);
UIDisabledColor = HEX_TO_IMVEC4(0x999999, 0xff);
UITextHighlightColor = HEX_TO_IMVEC4(0x8e8e8e, 0xff);
UIPrimaryLineColor = HEX_TO_IMVEC4(0x000000, 0xff);
@@ -3406,6 +3409,7 @@ void ImGuiFullscreen::SetTheme(std::string_view theme)
UIPrimaryLightColor = HEX_TO_IMVEC4(0xb5b5b5, 0xff);
UIPrimaryDarkColor = HEX_TO_IMVEC4(0x0A0A0A, 0xff);
UIPrimaryTextColor = HEX_TO_IMVEC4(0xffffff, 0xff);
UITextShadowColor = HEX_TO_IMVEC4(0x000000, 0x40);
UIDisabledColor = HEX_TO_IMVEC4(0x8d8d8d, 0xff);
UITextHighlightColor = HEX_TO_IMVEC4(0x676767, 0xff);
UIPrimaryLineColor = HEX_TO_IMVEC4(0xffffff, 0xff);
@@ -3425,6 +3429,7 @@ void ImGuiFullscreen::SetTheme(std::string_view theme)
UIPrimaryLightColor = HEX_TO_IMVEC4(0xb5b5b5, 0xff);
UIPrimaryDarkColor = HEX_TO_IMVEC4(0x222c4d, 0xff);
UIPrimaryTextColor = HEX_TO_IMVEC4(0xffffff, 0xff);
UITextShadowColor = HEX_TO_IMVEC4(0x000000, 0x40);
UIDisabledColor = HEX_TO_IMVEC4(0x8d8d8d, 0xff);
UITextHighlightColor = HEX_TO_IMVEC4(0x676767, 0xff);
UIPrimaryLineColor = HEX_TO_IMVEC4(0xffffff, 0xff);
@@ -3444,6 +3449,7 @@ void ImGuiFullscreen::SetTheme(std::string_view theme)
UIPrimaryLightColor = HEX_TO_IMVEC4(0xb5b5b5, 0xff);
UIPrimaryDarkColor = HEX_TO_IMVEC4(0x212121, 0xff);
UIPrimaryTextColor = HEX_TO_IMVEC4(0xffffff, 0xff);
UITextShadowColor = HEX_TO_IMVEC4(0x000000, 0x40);
UIDisabledColor = HEX_TO_IMVEC4(0x8d8d8d, 0xff);
UITextHighlightColor = HEX_TO_IMVEC4(0x676767, 0xff);
UIPrimaryLineColor = HEX_TO_IMVEC4(0xffffff, 0xff);
@@ -3463,6 +3469,7 @@ void ImGuiFullscreen::SetTheme(std::string_view theme)
UIPrimaryLightColor = HEX_TO_IMVEC4(0xadcfc8, 0xff);
UIPrimaryDarkColor = HEX_TO_IMVEC4(0x488c8c, 0xff);
UIPrimaryTextColor = HEX_TO_IMVEC4(0x000000, 0xff);
UITextShadowColor = HEX_TO_IMVEC4(0x000000, 0x00);
UIDisabledColor = HEX_TO_IMVEC4(0x4b4b4b, 0xff);
UITextHighlightColor = HEX_TO_IMVEC4(0x676767, 0xff);
UIPrimaryLineColor = HEX_TO_IMVEC4(0xffffff, 0xff);
@@ -3482,6 +3489,7 @@ void ImGuiFullscreen::SetTheme(std::string_view theme)
UIPrimaryLightColor = HEX_TO_IMVEC4(0xe05885, 0xff);
UIPrimaryDarkColor = HEX_TO_IMVEC4(0xc3859a, 0xff);
UIPrimaryTextColor = HEX_TO_IMVEC4(0x000000, 0xff);
UITextShadowColor = HEX_TO_IMVEC4(0x000000, 0x00);
UIDisabledColor = HEX_TO_IMVEC4(0x4b4b4b, 0xff);
UITextHighlightColor = HEX_TO_IMVEC4(0xeba0b9, 0xff);
UIPrimaryLineColor = HEX_TO_IMVEC4(0xffffff, 0xff);
@@ -3501,6 +3509,7 @@ void ImGuiFullscreen::SetTheme(std::string_view theme)
UIPrimaryLightColor = HEX_TO_IMVEC4(0xf9e7ac, 0xff);
UIPrimaryDarkColor = HEX_TO_IMVEC4(0xefad42, 0xff);
UIPrimaryTextColor = HEX_TO_IMVEC4(0x000000, 0xff);
UITextShadowColor = HEX_TO_IMVEC4(0x000000, 0x00);
UIDisabledColor = HEX_TO_IMVEC4(0x4b4b4b, 0xff);
UITextHighlightColor = HEX_TO_IMVEC4(0x676767, 0xff);
UIPrimaryLineColor = HEX_TO_IMVEC4(0xffffff, 0xff);
@@ -3520,6 +3529,7 @@ void ImGuiFullscreen::SetTheme(std::string_view theme)
UIPrimaryLightColor = HEX_TO_IMVEC4(0xb5b5b5, 0xff);
UIPrimaryDarkColor = HEX_TO_IMVEC4(0x632438, 0xff);
UIPrimaryTextColor = HEX_TO_IMVEC4(0xffffff, 0xff);
UITextShadowColor = HEX_TO_IMVEC4(0x000000, 0x40);
UIDisabledColor = HEX_TO_IMVEC4(0x969696, 0xff);
UITextHighlightColor = HEX_TO_IMVEC4(0x676767, 0xff);
UIPrimaryLineColor = HEX_TO_IMVEC4(0xffffff, 0xff);
@@ -3539,6 +3549,7 @@ void ImGuiFullscreen::SetTheme(std::string_view theme)
UIPrimaryLightColor = HEX_TO_IMVEC4(0x9833d6, 0xff);
UIPrimaryDarkColor = HEX_TO_IMVEC4(0x70269e, 0xff);
UIPrimaryTextColor = HEX_TO_IMVEC4(0xffffff, 0xff);
UITextShadowColor = HEX_TO_IMVEC4(0x000000, 0x40);
UIDisabledColor = HEX_TO_IMVEC4(0x969696, 0xff);
UITextHighlightColor = HEX_TO_IMVEC4(0x676767, 0xff);
UIPrimaryLineColor = HEX_TO_IMVEC4(0xffffff, 0xff);
@@ -3558,6 +3569,7 @@ void ImGuiFullscreen::SetTheme(std::string_view theme)
UIPrimaryLightColor = HEX_TO_IMVEC4(0x89a5ff, 0xff);
UIPrimaryDarkColor = HEX_TO_IMVEC4(0x7c8ef3, 0xff);
UIPrimaryTextColor = HEX_TO_IMVEC4(0x000000, 0xff);
UITextShadowColor = HEX_TO_IMVEC4(0x000000, 0x00);
UIDisabledColor = HEX_TO_IMVEC4(0x4b4b4b, 0xff);
UITextHighlightColor = HEX_TO_IMVEC4(0x676767, 0xff);
UIPrimaryLineColor = HEX_TO_IMVEC4(0xffffff, 0xff);
+2 -1
View File
@@ -64,6 +64,7 @@ namespace ImGuiFullscreen
extern ImVec4 UIPrimaryLightColor;
extern ImVec4 UIPrimaryDarkColor;
extern ImVec4 UIPrimaryTextColor;
extern ImVec4 UITextShadowColor;
extern ImVec4 UITextHighlightColor;
extern ImVec4 UIPrimaryLineColor;
extern ImVec4 UISecondaryColor;
@@ -194,7 +195,7 @@ namespace ImGuiFullscreen
void PrerenderMenuButtonBorder();
void AddTextWithShadow(ImDrawList* dl, std::pair<ImFont*, float> font, const ImVec2& pos, ImU32 col, const char* text,
const char* text_end = nullptr, float wrap_width = 0.0f, const ImVec4* cpu_fine_clip_rect = nullptr,
ImU32 shadow_col = IM_COL32(0, 0, 0, 64), bool strip_id_suffix = false);
ImU32 shadow_col = ImGui::GetColorU32(UITextShadowColor), bool strip_id_suffix = false);
void RenderTextClippedWithShadow(const ImVec2& pos_min, const ImVec2& pos_max, const char* text, const char* text_end = nullptr,
const ImVec2* text_size_if_known = nullptr, const ImVec2& align = ImVec2(0.0f, 0.0f), const ImRect* clip_rect = nullptr);
void BeginMenuButtons(u32 num_items = 0, float y_align = 0.0f, float x_padding = LAYOUT_MENU_BUTTON_X_PADDING,