summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-02-27 11:15:02 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-02-27 14:11:46 +0100
commita212011f37d457092e422cba331ca19394d3d97f (patch)
treecdb5cb91e864d1b054e8d5ed77041219b385bad7 /vcl
parentaa1b922c0f667d833e53b282ad9bbb78dec38502 (diff)
Resolves: tdf#123711 measure scrollbar for optimal width
Change-Id: I30225124e44e8a6290270ecba5024f36508817d3 Reviewed-on: https://gerrit.libreoffice.org/68428 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/treelist/treelistbox.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx
index 6c45fc325ebe..cfacceac46c5 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -3089,6 +3089,10 @@ Size SvTreeListBox::GetOptimalSize() const
}
long nMinWidth = nMinWidthInChars * approximate_char_width();
aRet.setWidth( std::max(aRet.Width(), nMinWidth) );
+
+ if (GetStyle() & WB_VSCROLL)
+ aRet.AdjustWidth(GetSettings().GetStyleSettings().GetScrollBarSize());
+
return aRet;
}