Avoid fold margin corruption in wxStyledTextCtrl under MSW

Don't use the content scale factor when creating bitmaps in InitPixMap(), this
is wrong and results in badly sized bitmaps at least under MSW (and possibly
GTK too).

Closes #17069.
This commit is contained in:
Eran Ifrah 2015-10-25 18:01:25 +01:00 committed by Vadim Zeitlin
parent fb5d1a002c
commit 3ec4b5cc22

View File

@ -257,8 +257,13 @@ void SurfaceImpl::InitPixMap(int width, int height, Surface *surface, WindowID w
hdcOwned = true;
if (width < 1) width = 1;
if (height < 1) height = 1;
#ifdef __WXMSW__
bitmap = new wxBitmap(width, height);
wxUnusedVar(winid);
#else
bitmap = new wxBitmap();
bitmap->CreateScaled(width, height,wxBITMAP_SCREEN_DEPTH,((wxWindow*)winid)->GetContentScaleFactor());
#endif
((wxMemoryDC*)hdc)->SelectObject(*bitmap);
}