diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-05-20 11:05:46 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-05-20 21:44:12 +0200 |
commit | 5c8de864f72c4e077b7be5871a2e51f02f69c0e9 (patch) | |
tree | 3b0c48783ab00ffdbd60f479ac55d7e86ae70e1f /svtools | |
parent | d6d82d3f2b4a468e4ca432c964f0923ce289d862 (diff) |
calc item width on request
Change-Id: Ifa56a903b3c3a3962fd2ecf76ff101976e17fc05
Reviewed-on: https://gerrit.libreoffice.org/72600
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/contnr/iconview.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/svtools/source/contnr/iconview.cxx b/svtools/source/contnr/iconview.cxx index 7138efdbddeb..4f94a21b87cf 100644 --- a/svtools/source/contnr/iconview.cxx +++ b/svtools/source/contnr/iconview.cxx @@ -206,7 +206,8 @@ void IconView::PaintEntry(SvTreeListEntry& rEntry, long nX, long nY, // draw icon if(nIconItem != nItemCount && nIconItem < nItemCount) { - auto nItemWidth = SvLBoxItem::GetWidth(pViewDataEntry, nIconItem); + SvLBoxItem* pItem = &rEntry.GetItem(nIconItem); + auto nItemWidth = pItem->GetWidth(this, pViewDataEntry, nIconItem); auto nItemHeight = SvLBoxItem::GetHeight(pViewDataEntry, nIconItem); aEntryPos.setX( nX ); @@ -219,8 +220,6 @@ void IconView::PaintEntry(SvTreeListEntry& rEntry, long nX, long nY, aEntryPos.AdjustY( -10 ); - SvLBoxItem* pItem = &rEntry.GetItem(nIconItem); - pItem->Paint(aEntryPos, *this, rRenderContext, pViewDataEntry, rEntry); } |