X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8a05a8d7d04b2e86da7c3288d77c1f395a0e6ef5..521f1d8371b4f010e8d8c55b55720eb11ff052e6:/src/propgrid/propgrid.cpp diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index 963279ad36..fcad2acd94 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -394,8 +394,10 @@ bool wxPropertyGrid::Create( wxWindow *parent, const wxString& name ) { - if ( !(style&wxBORDER_MASK) ) - style |= wxSIMPLE_BORDER; + if (!(style&wxBORDER_MASK)) + { + style |= wxBORDER_THEME; + } style |= wxVSCROLL; @@ -635,7 +637,9 @@ wxPropertyGrid::~wxPropertyGrid() // Delete common value records for ( i=0; iGetWindowStyle() & wxBORDER_MASK) == wxBORDER_THEME))); +#else + bool suppressMarginEdge = false; +#endif + if (!suppressMarginEdge) + dc.DrawLine( greyDepthX, y, greyDepthX, y2 ); + else + { + // Blank out the margin edge + dc.SetPen(wxPen(GetBackgroundColour())); + dc.DrawLine( greyDepthX, y, greyDepthX, y2 ); + dc.SetPen( linepen ); + } // Splitters unsigned int si; @@ -4263,7 +4287,10 @@ void wxPropertyGrid::RecalculateVirtualSize( int forceXPos ) m_width = width; m_height = height; - m_canvas->SetSize( x, y ); + // Explicitly pass the position - works around a bug in wxWidgets when the property grid + // has a native XP border and a contained window creeps up-and-left when size is set without + // the position. + m_canvas->SetSize( 0, 0, x, y ); m_pState->CheckColumnWidths();