WIP
This commit is contained in:
parent
3b16c38756
commit
e7debc495b
|
@ -145,6 +145,7 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame
|
|||
};
|
||||
|
||||
SetStatusWidths( arrayDim( dims ), dims );
|
||||
stsbar->SetFont( KIUI::GetInfoFont() );
|
||||
|
||||
// Create child subwindows.
|
||||
GetClientSize( &m_frameSize.x, &m_frameSize.y );
|
||||
|
|
|
@ -35,6 +35,8 @@
|
|||
#include <wx/settings.h>
|
||||
#include <wx/toplevel.h>
|
||||
|
||||
#include <widgets/ui_common.h>
|
||||
|
||||
|
||||
BEGIN_EVENT_TABLE( EDA_MSG_PANEL, wxPanel )
|
||||
EVT_PAINT( EDA_MSG_PANEL::OnPaint )
|
||||
|
@ -54,7 +56,8 @@ EDA_MSG_PANEL::EDA_MSG_PANEL( wxWindow* aParent, int aId,
|
|||
|
||||
m_last_x = 0;
|
||||
|
||||
m_fontSize = computeFontSize();
|
||||
SetFont( KIUI::GetInfoFont() );
|
||||
m_fontSize = GetTextExtent( wxT( "W" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -63,24 +66,16 @@ EDA_MSG_PANEL::~EDA_MSG_PANEL()
|
|||
}
|
||||
|
||||
|
||||
wxSize EDA_MSG_PANEL::computeFontSize()
|
||||
int EDA_MSG_PANEL::GetRequiredHeight()
|
||||
{
|
||||
// Get size of the wxSYS_DEFAULT_GUI_FONT
|
||||
wxSize fontSizeInPixels;
|
||||
|
||||
wxScreenDC dc;
|
||||
|
||||
dc.SetFont( wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT ) );
|
||||
dc.GetTextExtent( wxT( "W" ), &fontSizeInPixels.x, &fontSizeInPixels.y );
|
||||
|
||||
return fontSizeInPixels;
|
||||
}
|
||||
|
||||
|
||||
int EDA_MSG_PANEL::GetRequiredHeight()
|
||||
{
|
||||
// make space for two rows of text plus a number of pixels between them.
|
||||
return 2 * computeFontSize().y + 0;
|
||||
return 2 * fontSizeInPixels.y + 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -161,11 +161,6 @@ protected:
|
|||
|
||||
void erase( wxDC* DC );
|
||||
|
||||
/**
|
||||
* Compute the height and width of a 'W' in the system font.
|
||||
*/
|
||||
static wxSize computeFontSize();
|
||||
|
||||
/**
|
||||
* Calculate the width and height of a text string using the system UI font.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue