diff --git a/interface/wx/toolbar.h b/interface/wx/toolbar.h index 5630aca98f..79449c8638 100644 --- a/interface/wx/toolbar.h +++ b/interface/wx/toolbar.h @@ -594,6 +594,11 @@ public: usually unnecessary to call either this function or SetToolBitmapSize() at all. + This function returns the size in logical pixels, for consistency with + SetToolBitmapSize() which takes size in logical pixels. See @ref + overview_high_dpi for more information about the different pixel types + and how to convert between them. + @remarks Note that this is the size of the bitmap you pass to AddTool(), and not the eventual size of the tool button. diff --git a/src/common/tbarbase.cpp b/src/common/tbarbase.cpp index 1ef80ae35d..04c8057b9c 100644 --- a/src/common/tbarbase.cpp +++ b/src/common/tbarbase.cpp @@ -486,7 +486,7 @@ void wxToolBarBase::AdjustToolBitmapSize() // We want to round 1.5 down to 1, but 1.75 up to 2. int scaleFactorRoundedDown = static_cast(ceil(2*GetDPIScaleFactor())) / 2; - sizeNeeded = m_requestedBitmapSize*scaleFactorRoundedDown; + sizeNeeded = FromPhys(m_requestedBitmapSize*scaleFactorRoundedDown); } else // Determine the best size to use from the bitmaps we have. {