Skip to content

Commit

Permalink
Merge pull request #1 from nohal/rendered_chartbar
Browse files Browse the repository at this point in the history
Fixes for the rendered chartbar
  • Loading branch information
seandepagnier committed Jul 5, 2015
2 parents 74e3e88 + 0910684 commit 2879053
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
11 changes: 5 additions & 6 deletions src/chart1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1766,10 +1766,10 @@ bool MyApp::OnInit()

ocpnStyle::Style* style = g_StyleManager->GetCurrentStyle();

if( cc1->GetQuiltMode() ) {
g_Piano->SetVizIcon( new wxBitmap( style->GetIcon( _T("viz") ) ) );
g_Piano->SetInVizIcon( new wxBitmap( style->GetIcon( _T("redX") ) ) );
g_Piano->SetVizIcon( new wxBitmap( style->GetIcon( _T("viz") ) ) );
g_Piano->SetInVizIcon( new wxBitmap( style->GetIcon( _T("redX") ) ) );

if( cc1->GetQuiltMode() ) {
g_Piano->SetRoundedRectangles( true );
}
g_Piano->SetTMercIcon( new wxBitmap( style->GetIcon( _T("tmercprj") ) ) );
Expand Down Expand Up @@ -5484,11 +5484,10 @@ void MyFrame::SetupQuiltMode( void )
g_Piano->SetActiveKeyArray( empty_array );
g_Piano->SetNoshowIndexArray( empty_array );
g_Piano->SetEclipsedIndexArray( empty_array );
g_Piano->SetVizIcon( NULL );
g_Piano->SetInVizIcon( NULL );

ocpnStyle::Style* style = g_StyleManager->GetCurrentStyle();

g_Piano->SetVizIcon( new wxBitmap( style->GetIcon( _T("viz") ) ) );
g_Piano->SetInVizIcon( new wxBitmap( style->GetIcon( _T("redX") ) ) );
g_Piano->SetTMercIcon( new wxBitmap( style->GetIcon( _T("tmercprj") ) ) );
g_Piano->SetSkewIcon( new wxBitmap( style->GetIcon( _T("skewprj") ) ) );

Expand Down
10 changes: 9 additions & 1 deletion src/chcanv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8815,7 +8815,15 @@ void ChartCanvas::OnPaint( wxPaintEvent& event )
wxMemoryDC temp_dc;
#endif

wxRegion rgn_chart( 0, 0, GetVP().pix_width, GetVP().pix_height );
long height = GetVP().pix_height;

#ifdef __WXMAC__
//On OS X we have to explicitly extend the region for the piano area
ocpnStyle::Style* style = g_StyleManager->GetCurrentStyle();
if(!style->chartStatusWindowTransparent && g_bShowChartBar)
height += g_Piano->GetHeight();
#endif // __WXMAC__
wxRegion rgn_chart( 0, 0, GetVP().pix_width, height );

// In case Thumbnail is shown, set up dc clipper and blt iterator regions
if( pthumbwin ) {
Expand Down

0 comments on commit 2879053

Please sign in to comment.