Inherit scaling factor in wxBitmap ctor taking wxDC in wxGTK

This is the documented behaviour and not doing it breaks wxAuiTabCtrl
redrawing in high DPI, as it uses this ctor for double buffering.
This commit is contained in:
Vadim Zeitlin
2022-02-13 01:10:19 +01:00
parent cd7b6f5507
commit 0401fe21f7
2 changed files with 15 additions and 2 deletions

View File

@@ -83,11 +83,13 @@ public:
bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH) wxOVERRIDE;
bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH) wxOVERRIDE
{ return Create(sz.GetWidth(), sz.GetHeight(), depth); }
bool Create(int width, int height, const wxDC& WXUNUSED(dc))
{ return Create(width,height); }
#ifdef __WXGTK3__
bool Create(int width, int height, const wxDC& dc);
virtual void SetScaleFactor(double scale) wxOVERRIDE;
virtual double GetScaleFactor() const wxOVERRIDE;
#else
bool Create(int width, int height, const wxDC& WXUNUSED(dc))
{ return Create(width,height); }
#endif
virtual int GetHeight() const wxOVERRIDE;