Fix display of right aligned columns in wxGenericListCtrl.

Take into account the width of the image when drawing the right aligned item
in wxGenericListCtrl.

Closes #12562.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65799 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-10-13 22:10:45 +00:00
parent 71d6cd60ee
commit cff48ba847
2 changed files with 4 additions and 2 deletions

View File

@@ -804,7 +804,8 @@ void wxListLineData::DrawInReportMode( wxDC *dc,
int xOld = x;
x += width;
const int wText = width - 8;
width -= 8;
const int wText = width;
wxDCClipper clipper(*dc, xOld, rect.y, wText, rect.height);
if ( item->HasImage() )
@@ -820,7 +821,7 @@ void wxListLineData::DrawInReportMode( wxDC *dc,
}
if ( item->HasText() )
DrawTextFormatted(dc, item->GetText(), col, xOld, yMid, wText);
DrawTextFormatted(dc, item->GetText(), col, xOld, yMid, width);
}
}