Don't use wxScreenDC as this returns "a" screen but not "the" screen
Windows supports per-monitor and per-app DPI. wxScreenDC is unable to resolve the actual DPI setting since it has no window context. Fixes https://gitlab.com/kicad/code/kicad/-/issues/10681
This commit is contained in:
parent
d74a0cdaa3
commit
605dd8a580
|
@ -62,7 +62,7 @@ EDA_MSG_PANEL::~EDA_MSG_PANEL()
|
|||
int EDA_MSG_PANEL::GetRequiredHeight( wxWindow* aWindow )
|
||||
{
|
||||
wxSize fontSizeInPixels;
|
||||
wxScreenDC dc;
|
||||
wxWindowDC dc( aWindow );
|
||||
|
||||
dc.SetFont( KIUI::GetControlFont( aWindow ) );
|
||||
dc.GetTextExtent( wxT( "W" ), &fontSizeInPixels.x, &fontSizeInPixels.y );
|
||||
|
|
Loading…
Reference in New Issue