Fix wxInfoBar close button size in high DPI
Don't apply the scaling factor twice when dynamically creating the close button bitmap. Closes https://github.com/wxWidgets/wxWidgets/pull/1063 Closes #18283.
This commit is contained in:
committed by
Vadim Zeitlin
parent
8ec8a0cf66
commit
0c2956be09
@@ -102,6 +102,14 @@ Changes in behaviour which may result in build errors
|
|||||||
removing its name.
|
removing its name.
|
||||||
|
|
||||||
|
|
||||||
|
3.1.3: (released 2019-??-??)
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
All (GUI):
|
||||||
|
|
||||||
|
- Fix wxInfoBar close button size in high DPI (Stefan Ziegler).
|
||||||
|
|
||||||
|
|
||||||
3.1.2: (released 2018-12-10)
|
3.1.2: (released 2018-12-10)
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
|
@@ -103,13 +103,13 @@ GetCloseButtonBitmap(wxWindow *win,
|
|||||||
const wxColour& colBg,
|
const wxColour& colBg,
|
||||||
int flags = 0)
|
int flags = 0)
|
||||||
{
|
{
|
||||||
|
// size is physical here because it comes from wxArtProvider::GetSizeHint
|
||||||
wxBitmap bmp;
|
wxBitmap bmp;
|
||||||
bmp.CreateScaled(size.x, size.y, wxBITMAP_SCREEN_DEPTH, win->GetContentScaleFactor());
|
bmp.Create(size.x, size.y, wxBITMAP_SCREEN_DEPTH);
|
||||||
wxMemoryDC dc(bmp);
|
wxMemoryDC dc(bmp);
|
||||||
dc.SetBackground(colBg);
|
dc.SetBackground(colBg);
|
||||||
dc.Clear();
|
dc.Clear();
|
||||||
wxRendererNative::Get().
|
wxRendererNative::Get().DrawTitleBarBitmap(win, dc, size, wxTITLEBAR_BUTTON_CLOSE, flags);
|
||||||
DrawTitleBarBitmap(win, dc, win->FromDIP(size), wxTITLEBAR_BUTTON_CLOSE, flags);
|
|
||||||
return bmp;
|
return bmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user