From 0deebab8a86ff82d802cf0d2a843d8b9f581838d Mon Sep 17 00:00:00 2001 From: Marek Roszko Date: Sun, 30 Oct 2022 18:34:58 -0400 Subject: [PATCH] Try and make the msg panel resize more correctly due to dpi --- common/eda_draw_frame.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/common/eda_draw_frame.cpp b/common/eda_draw_frame.cpp index bba6bb5c7f..895cb47898 100644 --- a/common/eda_draw_frame.cpp +++ b/common/eda_draw_frame.cpp @@ -169,6 +169,16 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame { wxMoveEvent dummy; OnMove( dummy ); + + // we need to kludge the msg panel to the correct size again + // especially important even for first launches as the constructor of the window here usually doesn't + // have the correct dpi awareness yet + m_frameSize.y += m_msgFrameHeight; + m_msgFrameHeight = EDA_MSG_PANEL::GetRequiredHeight( this ); + m_frameSize.y -= m_msgFrameHeight; + + m_messagePanel->SetPosition( wxPoint( 0, m_frameSize.y ) ); + m_messagePanel->SetSize( m_frameSize.x, m_msgFrameHeight ); } ); #endif }