From 571fda28cf2186d93143d5d0ec19fd95e495586a Mon Sep 17 00:00:00 2001 From: Paul Kulchenko Date: Wed, 23 Oct 2019 20:10:45 -0700 Subject: [PATCH] Add scaling of dock art as required by scaling. --- src/aui/dockart.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/aui/dockart.cpp b/src/aui/dockart.cpp index 9afb24c439..7818b2b8aa 100644 --- a/src/aui/dockart.cpp +++ b/src/aui/dockart.cpp @@ -765,6 +765,7 @@ void wxAuiDefaultDockArt::DrawPaneButton(wxDC& dc, break; } + bmp = wxAuiScaleBitmap(bmp, window->GetContentScaleFactor()); wxRect rect = _rect; @@ -791,10 +792,11 @@ void wxAuiDefaultDockArt::DrawPaneButton(wxDC& dc, } // draw the background behind the button - dc.DrawRectangle(rect.x, rect.y, 16-window->FromDIP(1), 16-window->FromDIP(1)); + dc.DrawRectangle(rect.x, rect.y, + bmp.GetScaledWidth() - window->FromDIP(1), + bmp.GetScaledHeight() - window->FromDIP(1)); } - // draw the button itself dc.DrawBitmap(bmp, rect.x, rect.y, true); }