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
(cherry picked from commit 605dd8a580
)
This commit is contained in:
parent
40462012ee
commit
af4a4cbc08
|
@ -63,7 +63,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