vcl/source/treelist/iconview.cxx | 4 ++++ vcl/source/treelist/svimpbox.cxx | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-)
New commits: commit 2bf7fa9d1c5977cb65184e9d524cc6df1e19ad20 Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Wed Feb 3 17:21:54 2021 +0100 Commit: Jan Holesovsky <ke...@collabora.com> CommitDate: Tue Mar 2 11:22:12 2021 +0100 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.k...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111657 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Jan Holesovsky <ke...@collabora.com> 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 ); commit 6216f51febc107cd093d1e3a09d1bf270cfb0ded Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Wed Feb 3 16:17:29 2021 +0100 Commit: Jan Holesovsky <ke...@collabora.com> CommitDate: Tue Mar 2 11:22:00 2021 +0100 Invalidate IconView on scroll if has only one row When we have only one row the page size for scrollbar is set to 1 so delta is always 1. This prevents from invalidation when scrolling up using a scrollbar button and results in artifacts on the screen. Change-Id: I92ed0133450ba459e19b575d8c52d059464b1e33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110377 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111656 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Jan Holesovsky <ke...@collabora.com> diff --git a/vcl/source/treelist/svimpbox.cxx b/vcl/source/treelist/svimpbox.cxx index 5ca02e42ee74..72d05e61d35c 100644 --- a/vcl/source/treelist/svimpbox.cxx +++ b/vcl/source/treelist/svimpbox.cxx @@ -325,7 +325,7 @@ IMPL_LINK( SvImpLBox, ScrollUpDownHdl, ScrollBar *, pScrollBar, void ) if( nDelta > 0 ) { - if( nDelta == 1 ) + if( nDelta == 1 && pScrollBar->GetPageSize() > 1) CursorDown(); else PageDown( static_cast<sal_uInt16>(nDelta) ); @@ -333,7 +333,7 @@ IMPL_LINK( SvImpLBox, ScrollUpDownHdl, ScrollBar *, pScrollBar, void ) else { nDelta *= -1; - if( nDelta == 1 ) + if( nDelta == 1 && pScrollBar->GetPageSize() > 1) CursorUp(); else PageUp( static_cast<sal_uInt16>(nDelta) ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits