summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-03-04 14:18:31 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-03-04 16:07:48 +0000
commitd3f10f8033f6431bc34a87ff92433f96ccc620f4 (patch)
treedfdaea1aa0aa0744135151e20fcc69b52d15ac80 /vcl/source
parentcc71e03d3b249989639d2073e8e9635d5de0b158 (diff)
include scrollbar width in optimalsize if vert scrollbar is always shown
Change-Id: I9704b5becf6f0003233be2b3aa78b4b21a91fae7
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/control/lstbox.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index 888081810614..cb15f0ad4171 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -1291,11 +1291,19 @@ Size ListBox::CalcMinimumSize() const
aSz = CalcSubEditSize();
+ bool bAddScrollWidth = false;
+
if (IsDropDownBox())
{
aSz.Height() += 4; // add a space between entry and border
aSz.Width() += 4; // add a little breathing space
+ bAddScrollWidth = true;
+ }
+ else
+ bAddScrollWidth = (GetStyle() & WB_VSCROLL) == WB_VSCROLL;
+ if (bAddScrollWidth)
+ {
// try native borders; scrollbar size may not be a good indicator
// see how large the edit area inside is to estimate what is needed for the dropdown
ImplControlValue aControlValue;