Correctly determine best wxPropertyGrid width.
Improve wxPropertyGrid::DoGetBestSize() to correctly determine the window width by using the sum of columns widths. Also correct wxPropertyGridPageState::GetColumnFitWidth() to account for the bitmaps. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61796 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -768,8 +768,10 @@ int wxPropertyGridPageState::GetColumnFitWidth(wxClientDC& dc,
|
||||
if ( col == 0 )
|
||||
w += ( ((int)p->m_depth-1) * pg->m_subgroup_extramargin );
|
||||
|
||||
//
|
||||
// TODO: Add bitmap support.
|
||||
// account for the bitmap
|
||||
if ( col == 1 )
|
||||
w += p->GetImageOffset(pg->GetImageRect(p, -1).GetWidth());
|
||||
|
||||
|
||||
w += (wxPG_XBEFORETEXT*2);
|
||||
|
||||
|
Reference in New Issue
Block a user