[Libreoffice-commits] core.git: vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed May 5 13:58:58 UTC 2021
vcl/source/treelist/treelistbox.cxx | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
New commits:
commit 122ceeff4c8d04bedb3fc4c9dd811c6005ee5104
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed May 5 12:19:04 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed May 5 15:58:10 2021 +0200
factor in borders regardless of WB_BORDER
Change-Id: If6321b3c903212b6b1b68c028a2c5aa4f9a59a3a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115140
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx
index 94dfbb8629fd..1fc5feaf21fc 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -3107,13 +3107,12 @@ Size SvTreeListBox::GetOptimalSize() const
Size aRet(0, getPreferredDimensions(aWidths));
for (tools::Long aWidth : aWidths)
aRet.AdjustWidth(aWidth );
- if (GetStyle() & WB_BORDER)
- {
- sal_Int32 nLeftBorder(0), nTopBorder(0), nRightBorder(0), nBottomBorder(0);
- GetBorder(nLeftBorder, nTopBorder, nRightBorder, nBottomBorder);
- aRet.AdjustWidth(nLeftBorder + nRightBorder);
- aRet.AdjustHeight(nTopBorder + nBottomBorder);
- }
+
+ sal_Int32 nLeftBorder(0), nTopBorder(0), nRightBorder(0), nBottomBorder(0);
+ GetBorder(nLeftBorder, nTopBorder, nRightBorder, nBottomBorder);
+ aRet.AdjustWidth(nLeftBorder + nRightBorder);
+ aRet.AdjustHeight(nTopBorder + nBottomBorder);
+
tools::Long nMinWidth = nMinWidthInChars * approximate_char_width();
aRet.setWidth( std::max(aRet.Width(), nMinWidth) );
More information about the Libreoffice-commits
mailing list