Always reduce size of the last (instead of widest) wxPropertyGrid column when control's client size changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -947,9 +947,7 @@ void wxPropertyGridPageState::CheckColumnWidths( int widthChange )
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Column to reduce, if needed. Take last one that exceeds minimum width.
|
// Column to reduce, if needed. Take last one that exceeds minimum width.
|
||||||
// Except if auto splitter centering is used, in which case use widest.
|
|
||||||
int reduceCol = -1;
|
int reduceCol = -1;
|
||||||
int highestColWidth = 0;
|
|
||||||
|
|
||||||
#ifdef __WXDEBUG__
|
#ifdef __WXDEBUG__
|
||||||
if ( debug )
|
if ( debug )
|
||||||
@@ -967,20 +965,11 @@ void wxPropertyGridPageState::CheckColumnWidths( int widthChange )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( pg->HasFlag(wxPG_SPLITTER_AUTO_CENTER) )
|
// Always reduce the last column that is larger than minimum size
|
||||||
{
|
// (looks nicer, even with auto-centering enabled).
|
||||||
if ( m_colWidths[i] >= highestColWidth )
|
|
||||||
{
|
|
||||||
highestColWidth = m_colWidths[i];
|
|
||||||
reduceCol = i;
|
reduceCol = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
reduceCol = i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int colsWidth = pg->m_marginWidth;
|
int colsWidth = pg->m_marginWidth;
|
||||||
for ( i=0; i<m_colWidths.size(); i++ )
|
for ( i=0; i<m_colWidths.size(); i++ )
|
||||||
|
Reference in New Issue
Block a user