From d17171db269c73accd97015e49abc3b77d9be883 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 20 Mar 2022 02:27:18 +0100 Subject: [PATCH] Fix toolbar bitmap size after toggling icons/text style When recreating the toolbar we now need to reset the bitmap size too, as otherwise the correct size is not actually set for the new toolbar. --- src/msw/toolbar.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/msw/toolbar.cpp b/src/msw/toolbar.cpp index 05515affa9..2005257e6e 100644 --- a/src/msw/toolbar.cpp +++ b/src/msw/toolbar.cpp @@ -538,6 +538,11 @@ void wxToolBar::Recreate() // TB_DELETEBUTTON. m_nButtons = 0; + // We need to ensure that the tool bitmap size will be adjusted if it's + // different from the default and not from the value used for the toolbar + // we just destroyed. + wxToolBarBase::DoSetToolBitmapSize(wxSize(16, 15)); + Realize(); }