diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2021-02-03 17:21:54 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2021-02-04 15:12:02 +0100 |
commit | 217b9423e4bdabba096a9ab2440d796a69cdf5b5 (patch) | |
tree | 9a830887ae8961fd4cb9629f5f22304b3d6c18b8 /vcl | |
parent | 7b4fa321200263f9aefb36c7b3b163b9d3116de6 (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); |