diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2021-02-03 17:21:54 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2021-04-10 21:25:27 +0200 |
commit | 69f662277496d88f94772b3aa3fb4dcf01d2a8ee (patch) | |
tree | f71bc6e06ec15144370d4ea460ba58c6b559623e /vcl | |
parent | 690d3f11f36d350eb110621ae237464d7185be42 (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>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/treelist/iconview.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vcl/source/treelist/iconview.cxx b/vcl/source/treelist/iconview.cxx index 7786a6976c2a..44fc3db789d4 100644 --- a/vcl/source/treelist/iconview.cxx +++ b/vcl/source/treelist/iconview.cxx @@ -104,6 +104,10 @@ void IconView::PaintEntry(SvTreeListEntry& rEntry, tools::Long nX, tools::Long n 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); |