UI: Update Texture Cache debug window to support dark mode

This commit is contained in:
Crementif 2025-07-15 17:37:59 +02:00
parent 8b196cce68
commit f5301af3e7

View file

@ -113,14 +113,14 @@ TextureRelationViewerWindow::TextureRelationViewerWindow(wxFrame& parent)
wxBoxSizer* sizerBottom = new wxBoxSizer(wxHORIZONTAL);
sizer->Add(textureRelationListA, 1, wxEXPAND | wxBOTTOM, 0);
wxButton* button = new wxButton(mainPane, REFRESH_ID, _("Refresh"), wxPoint(0, 0), wxSize(80, 26));
sizerBottom->Add(button, 0, wxBOTTOM | wxTOP | wxLEFT, 10);
wxButton* button = new wxButton(mainPane, REFRESH_ID, _("Refresh"));
sizerBottom->Add(button, 0, wxALIGN_CENTER_VERTICAL | wxBOTTOM | wxTOP | wxLEFT, 10);
wxCheckBox* checkboxShowOnlyActive = new wxCheckBox(mainPane, CHECKBOX_SHOW_ONLY_ACTIVE, _("Show only active"), wxPoint(0, 0), wxSize(110, 26));
sizerBottom->Add(checkboxShowOnlyActive, 0, wxBOTTOM | wxTOP | wxLEFT, 10);
wxCheckBox* checkboxShowOnlyActive = new wxCheckBox(mainPane, CHECKBOX_SHOW_ONLY_ACTIVE, _("Show only active"));
sizerBottom->Add(checkboxShowOnlyActive, 0, wxALIGN_CENTER_VERTICAL | wxBOTTOM | wxTOP | wxLEFT, 10);
wxCheckBox* checkboxShowViews = new wxCheckBox(mainPane, CHECKBOX_SHOW_VIEWS, _("Show views"), wxPoint(0, 0), wxSize(90, 26));
sizerBottom->Add(checkboxShowViews, 0, wxBOTTOM | wxTOP | wxLEFT, 10);
wxCheckBox* checkboxShowViews = new wxCheckBox(mainPane, CHECKBOX_SHOW_VIEWS, _("Show views"));
sizerBottom->Add(checkboxShowViews, 0, wxALIGN_CENTER_VERTICAL | wxBOTTOM | wxTOP | wxLEFT, 10);
checkboxShowViews->SetValue(true);
textureRelationListA->Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(TextureRelationViewerWindow::OnTextureListRightClick), NULL, this);
@ -132,8 +132,6 @@ TextureRelationViewerWindow::TextureRelationViewerWindow(wxFrame& parent)
mainPane->SetSizer(sizer);
RefreshTextureList();
wxFrame::SetBackgroundColour(*wxWHITE);
}
TextureRelationViewerWindow::~TextureRelationViewerWindow()
@ -183,11 +181,10 @@ void TextureRelationViewerWindow::_setTextureRelationListItemTexture(wxListCtrl*
{
sprintf(tempStr + strlen(tempStr), "(%d)", alternativeViewCount + 1);
}
uint32 bgColor = 0xFFEEEEEE;
wxListItem item;
item.SetId(rowIndex);
item.SetText(tempStr);
item.SetBackgroundColour(wxColour(bgColor));
item.SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW).ChangeLightness(238));
uiList->InsertItem(item);
sint32 columnIndex = 1;
@ -279,11 +276,10 @@ void TextureRelationViewerWindow::_setTextureRelationListItemView(wxListCtrl* ui
else
sprintf(tempStr, "> VIEW(%d)", alternativeViewCount+1);
// find and handle highlight entry
uint32 bgColor = 0xFFDDDDDD;
wxListItem item;
item.SetId(rowIndex);
item.SetText(tempStr);
item.SetBackgroundColour(wxColour(bgColor));
item.SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW).ChangeLightness(221));
uiList->InsertItem(item);
//uiList->SetItemPtrData(item, (wxUIntPtr)viewInfo);
sint32 columnIndex = 1;
@ -392,7 +388,6 @@ void TextureRelationViewerWindow::RefreshTextureList()
void TextureRelationViewerWindow::OnTextureListRightClick(wxMouseEvent& event)
{
}
void TextureRelationViewerWindow::Close()