X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e84e5ba3c1317779378a3ef2b2dc4657113e6a42..b80fdc029995a0c2ce04910e26d652292c64d7bc:/src/propgrid/propgrid.cpp diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index 963279ad36..4eb8520799 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(); @@ -5205,14 +5232,25 @@ void wxPropertyGrid::AddActionTrigger( int action, int keycode, int modifiers ) void wxPropertyGrid::ClearActionTriggers( int action ) { wxPGHashMapI2I::iterator it; + bool didSomething; - for ( it = m_actionTriggers.begin(); it != m_actionTriggers.end(); ++it ) + do { - if ( it->second == action ) + didSomething = false; + + for ( it = m_actionTriggers.begin(); + it != m_actionTriggers.end(); + it++ ) { - m_actionTriggers.erase(it); + if ( it->second == action ) + { + m_actionTriggers.erase(it); + didSomething = true; + break; + } } } + while ( didSomething ); } void wxPropertyGrid::HandleKeyEvent( wxKeyEvent &event, bool fromChild )