diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-03-04 14:18:31 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-03-04 16:07:48 +0000 |
commit | d3f10f8033f6431bc34a87ff92433f96ccc620f4 (patch) | |
tree | dfdaea1aa0aa0744135151e20fcc69b52d15ac80 /vcl/source | |
parent | cc71e03d3b249989639d2073e8e9635d5de0b158 (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.cxx | 8 |
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; |