From 65b887c35f4e33252ce465f60f1f545e387eb186 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sun, 2 Nov 2014 16:28:32 +0000 Subject: [PATCH] Fix wxToolBarBase::AdjustToolBitmapSize() for HiDPI on OS X wxOSX's wxToolBar code uses toolbar size computed by AdjustToolBitmapSize() to determine which of the builtin toolbar sizes to use. Because AdjustToolBitmapSize() returned 2x the "logical" size, it would always pick NSToolbarSizeModeRegular regardless of icon size, resulting in differently-sized toolbar on HiDPI and low-DPI screens. Use scaled size instead. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78088 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/tbarbase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/tbarbase.cpp b/src/common/tbarbase.cpp index e36d96eccf..9851b0d8f6 100644 --- a/src/common/tbarbase.cpp +++ b/src/common/tbarbase.cpp @@ -447,7 +447,7 @@ void wxToolBarBase::AdjustToolBitmapSize() { const wxBitmap& bmp = (*i)->GetNormalBitmap(); if ( bmp.IsOk() ) - sizeActual.IncTo(bmp.GetSize()); + sizeActual.IncTo(bmp.GetScaledSize()); } if ( sizeActual != sizeOrig )