summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2021-02-03 17:21:54 +0100
committerJan Holesovsky <kendy@collabora.com>2021-03-02 11:22:12 +0100
commit2bf7fa9d1c5977cb65184e9d524cc6df1e19ad20 (patch)
treeca35f394d77f30aff21d8d23d1cc575a300da64e /vcl
parent6216f51febc107cd093d1e3a09d1bf270cfb0ded (diff)
Resize IconView entry if there is no space
If IconView has only one row and there is no space for default 100px height - scale down the entries. Change-Id: I8b310f1274ba91872af0849e36e3a87e775c98b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110381 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111657 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/treelist/iconview.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/vcl/source/treelist/iconview.cxx b/vcl/source/treelist/iconview.cxx
index cda30201fa2f..70d19c19d08b 100644
--- a/vcl/source/treelist/iconview.cxx
+++ b/vcl/source/treelist/iconview.cxx
@@ -106,6 +106,10 @@ void IconView::PaintEntry(SvTreeListEntry& rEntry, long nX, long nY,
const Color aHighlightTextColor(rSettings.GetHighlightTextColor());
aHighlightFont.SetColor(aHighlightTextColor);
+ Size aOutputSize = GetOutputSizePixel();
+ if (aOutputSize.getHeight() < nTempEntryHeight)
+ nTempEntryHeight = aOutputSize.getHeight();
+
Size aRectSize(nTempEntryWidth, nTempEntryHeight);
SvViewDataEntry* pViewDataEntry = GetViewDataEntry( &rEntry );