From 630612e2c9ceec3cfacda26b0bded3d2b1937d24 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 19 Mar 2022 22:59:33 +0100 Subject: [PATCH] Initialize wxAuiToolBar values in pixels after creating it Don't use FromDIP() before the window is created, this doesn't work correctly in wxMSW. See #22193. --- src/aui/auibar.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/aui/auibar.cpp b/src/aui/auibar.cpp index e1f8a18c40..1a5641ada0 100644 --- a/src/aui/auibar.cpp +++ b/src/aui/auibar.cpp @@ -854,8 +854,6 @@ void wxAuiToolBar::Init() m_actionItem = NULL; m_tipItem = NULL; m_art = new wxAuiDefaultToolBarArt; - m_toolPacking = FromDIP(2); - m_toolBorderPadding = FromDIP(3); m_toolTextOrientation = wxAUI_TBTOOL_TEXT_BOTTOM; m_gripperSizerItem = NULL; m_overflowSizerItem = NULL; @@ -879,6 +877,9 @@ bool wxAuiToolBar::Create(wxWindow* parent, m_windowStyle = style; + m_toolPacking = FromDIP(2); + m_toolBorderPadding = FromDIP(3); + m_gripperVisible = (style & wxAUI_TB_GRIPPER) ? true : false; m_overflowVisible = (style & wxAUI_TB_OVERFLOW) ? true : false;