From bd6ffa9f2b8c5caa6efa2cec97fc816b22b3b391 Mon Sep 17 00:00:00 2001 From: Jaakko Salli Date: Sun, 8 Mar 2009 11:04:36 +0000 Subject: [PATCH] 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 --- src/propgrid/propgridpagestate.cpp | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/propgrid/propgridpagestate.cpp b/src/propgrid/propgridpagestate.cpp index 0e34d126fb..742b81fd47 100644 --- a/src/propgrid/propgridpagestate.cpp +++ b/src/propgrid/propgridpagestate.cpp @@ -947,9 +947,7 @@ void wxPropertyGridPageState::CheckColumnWidths( int widthChange ) // // 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 highestColWidth = 0; #ifdef __WXDEBUG__ if ( debug ) @@ -967,18 +965,9 @@ void wxPropertyGridPageState::CheckColumnWidths( int widthChange ) } else { - if ( pg->HasFlag(wxPG_SPLITTER_AUTO_CENTER) ) - { - if ( m_colWidths[i] >= highestColWidth ) - { - highestColWidth = m_colWidths[i]; - reduceCol = i; - } - } - else - { - reduceCol = i; - } + // Always reduce the last column that is larger than minimum size + // (looks nicer, even with auto-centering enabled). + reduceCol = i; } } -- 2.45.2