I open an application containing a wxAuiToolBar with a Scale of 100% (this is the recommended scale for my monitor).
This wxAuiToolBar contains two elements: a wxChoice and a wxTextCtrl. After opening the application, I change the Scale to 175%, and the height of the wxChoice element becomes smaller than the height of the wxTextCtrl element. However, if I restart the application, the height of the wxChoice element becomes the same as the height of the wxTextCtrl element.
See scrennshot:
wrong_wxchoice_height_in_auibar.png (view on web)This is a bug in the wxAuiToolBar. The height of the wxChoice element should immediately match the height of the wxTextCtrl element, without having to restart the application.
#include <wx/wx.h> #include <wx/choice.h> #include <wx/aui/auibar.h> class MyFrame : public wxFrame { public: MyFrame() : wxFrame(nullptr, wxID_ANY, "wxAuiToolBar Demo", wxDefaultPosition, wxSize(400, 150)) { auto* toolbar = new wxAuiToolBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_TB_DEFAULT_STYLE); auto* choice = new wxChoice(toolbar, wxID_ANY); choice->Append("One"); choice->Append("Two"); choice->Append("Three"); choice->SetSelection(0); auto* text = new wxTextCtrl(toolbar, wxID_ANY, "Value", wxDefaultPosition, wxSize(120, -1)); toolbar->AddControl(choice); toolbar->AddSpacer(5); toolbar->AddControl(text); toolbar->Realize(); auto* sizer = new wxBoxSizer(wxVERTICAL); sizer->Add(toolbar, 0, wxEXPAND); SetSizer(sizer); } }; class MyApp : public wxApp { public: bool OnInit() override { MSWEnableDarkMode(wxApp::DarkMode_Always); auto* frame = new MyFrame(); frame->Show(); return true; } }; wxIMPLEMENT_APP(MyApp);
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Hmm, I thought I had fixed this with d5c0625 (Fix appearance of controls in wxAuiToolBar after DPI change, 2026-05-07) but apparently not.
Also, this is almost surely not related to dark mode at all.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@vadz
Yes, this issue occurs in both light and dark mode.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()