mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-12-16 22:37:01 +00:00
UI: Fix black text after graphic pack is disabled in dark mode
This commit is contained in:
parent
55a735dcfa
commit
217ba859f4
2 changed files with 7 additions and 4 deletions
|
|
@ -131,11 +131,11 @@ void GraphicPacksWindow2::FillGraphicPackList() const
|
||||||
{
|
{
|
||||||
auto tmp_text = m_graphic_pack_tree->GetItemText(node);
|
auto tmp_text = m_graphic_pack_tree->GetItemText(node);
|
||||||
m_graphic_pack_tree->SetItemText(node, tmp_text + " (Unsupported version)");
|
m_graphic_pack_tree->SetItemText(node, tmp_text + " (Unsupported version)");
|
||||||
m_graphic_pack_tree->SetItemTextColour(node, 0x0000CC);
|
m_graphic_pack_tree->SetItemTextColour(node, m_incompatible_colour);
|
||||||
canEnable = false;
|
canEnable = false;
|
||||||
}
|
}
|
||||||
else if (p->IsActivated())
|
else if (p->IsActivated())
|
||||||
m_graphic_pack_tree->SetItemTextColour(node, 0x009900);
|
m_graphic_pack_tree->SetItemTextColour(node, m_activated_colour);
|
||||||
|
|
||||||
m_graphic_pack_tree->MakeCheckable(node, p->IsEnabled());
|
m_graphic_pack_tree->MakeCheckable(node, p->IsEnabled());
|
||||||
if (!canEnable)
|
if (!canEnable)
|
||||||
|
|
@ -509,7 +509,7 @@ void GraphicPacksWindow2::OnTreeChoiceChanged(wxTreeEvent& event)
|
||||||
if (!requiresRestart)
|
if (!requiresRestart)
|
||||||
{
|
{
|
||||||
ReloadPack(graphic_pack);
|
ReloadPack(graphic_pack);
|
||||||
m_graphic_pack_tree->SetItemTextColour(item, 0x009900);
|
m_graphic_pack_tree->SetItemTextColour(item, m_activated_colour);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -517,7 +517,7 @@ void GraphicPacksWindow2::OnTreeChoiceChanged(wxTreeEvent& event)
|
||||||
if (!requiresRestart)
|
if (!requiresRestart)
|
||||||
{
|
{
|
||||||
DeleteShadersFromRuntimeCache(graphic_pack);
|
DeleteShadersFromRuntimeCache(graphic_pack);
|
||||||
m_graphic_pack_tree->SetItemTextColour(item, *wxBLACK);
|
m_graphic_pack_tree->SetItemTextColour(item, m_default_colour);
|
||||||
}
|
}
|
||||||
GraphicPack2::DeactivateGraphicPack(graphic_pack);
|
GraphicPack2::DeactivateGraphicPack(graphic_pack);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,9 @@ private:
|
||||||
std::string m_gp_name, m_gp_description;
|
std::string m_gp_name, m_gp_description;
|
||||||
|
|
||||||
float m_ratio = 0.55f;
|
float m_ratio = 0.55f;
|
||||||
|
wxColour m_default_colour = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
|
||||||
|
wxColour m_activated_colour = wxSystemSettings::SelectLightDark(wxColour(0x00, 0xCC, 0x00), wxColour(0x42, 0xB3, 0x42));
|
||||||
|
wxColour m_incompatible_colour = wxSystemSettings::SelectLightDark(wxColour(0xCC, 0x00, 0x00), wxColour(0xDE, 0x49, 0x49));
|
||||||
|
|
||||||
wxTreeItemId FindTreeItem(const wxTreeItemId& root, const wxString& text) const;
|
wxTreeItemId FindTreeItem(const wxTreeItemId& root, const wxString& text) const;
|
||||||
void LoadPresetSelections(const GraphicPackPtr& gp);
|
void LoadPresetSelections(const GraphicPackPtr& gp);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue