Permalink
Browse files

Make status bar font user selectable, but still scaling with window

size.
  • Loading branch information...
JesperWe committed Jun 17, 2012
1 parent 36f7cfd commit 7a0d88ddc3aa3ad608479fcece5a30686126e64e
Showing with 11 additions and 4 deletions.
  1. +8 −4 src/chart1.cpp
  2. +3 −0 src/options.cpp
View
@@ -2110,8 +2110,6 @@ MyFrame::MyFrame( wxFrame *frame, const wxString& title, const wxPoint& pos, con
m_ulLastNEMATicktime = 0;
m_pStatusBar = NULL;
// g_FloatingCompassDialog = new ocpnFloatingCompassWindow(this);
g_toolbar = NULL;
m_toolbar_scale_tools_shown = false;
@@ -2987,11 +2985,17 @@ void MyFrame::DoSetSize( void )
#ifdef __WXMAC__
font_size = wxMax(10, font_size); // beats me...
#endif
wxFont* templateFont = pFontMgr->GetFont( _("StatusBar"), 11 );
font_size += templateFont->GetPointSize() - 11;
font_size = wxMin( font_size, 11 );
font_size = wxMax( font_size, 5 );
wxFont *pstat_font = wxTheFontList->FindOrCreateFont( font_size, wxFONTFAMILY_DEFAULT,
wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD );
wxFont *pstat_font = wxTheFontList->FindOrCreateFont( font_size,
wxFONTFAMILY_SWISS, templateFont->GetStyle(), templateFont->GetWeight(), false,
templateFont->GetFaceName() );
m_pStatusBar->SetFont( *pstat_font );
}
View
@@ -59,6 +59,7 @@
wxString GetOCPNKnownLanguage(wxString lang_canonical, wxString *lang_dir);
void EmptyChartGroupArray(ChartGroupArray *s);
extern MyFrame *gFrame;
extern bool g_bShowPrintIcon;
extern bool g_bShowOutlines;
@@ -2127,6 +2128,8 @@ void options::OnXidOkClick( wxCommandEvent& event )
if( g_StyleManager->GetStyleNextInvocation() != oldStyle ) {
iret |= STYLE_CHANGED;
}
wxSizeEvent nullEvent;
gFrame->OnSize( nullEvent );
}
// PlugIn Manager Panel

0 comments on commit 7a0d88d

Please sign in to comment.