FIX: update the bitmap of icon for dark mode

jira: [STUDIO-12180]
Change-Id: Ib39f723be9b1f02f2f0dd21204d7831627481528
(cherry picked from commit 73d9f515de93d324c74878f3ceea5ee0f7049073)
This commit is contained in:
xin.zhang 2025-05-15 17:34:24 +08:00 committed by Noisyfox
parent eacade9e34
commit 3a35d4ca22
2 changed files with 6 additions and 1 deletions

View file

@ -3253,7 +3253,11 @@ static void update_dark_children_ui(wxWindow* window, bool just_buttons_update =
is_btn = false;*/
if (!window) return;
wxGetApp().UpdateDarkUI(window);
if (ScalableButton* btn = dynamic_cast<ScalableButton*>(window)) {
btn->UpdateDarkUI();
} else {
wxGetApp().UpdateDarkUI(window);
}
auto children = window->GetChildren();
for (auto child : children) {

View file

@ -263,6 +263,7 @@ public:
void UseDefaultBitmapDisabled();
void msw_rescale();
void UpdateDarkUI() { msw_rescale(); };
private:
wxWindow* m_parent { nullptr };