diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-07-03 14:51:01 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-07-03 14:51:01 +0100 |
commit | 67249b4aa56bf38c4c573226a06d293e0415bbea (patch) | |
tree | b3d7172af4fae3714cd274f775c70302d0f2288f /vcl/source | |
parent | 12e20bd9aca9cddd00599c76bc256849266cd7f4 (diff) |
readjust the combobox optimal size calculation, needs to be more stable
Change-Id: I1e9b07e5e5e53ae62baa77610f47083b580eaf7d
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/control/combobox.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 35f2e6f0ff05..77735c83bf48 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -1073,11 +1073,11 @@ Size ComboBox::CalcMinimumSize() const { aSz = mpImplLB->CalcSize( mpImplLB->GetEntryList()->GetEntryCount() ); aSz.Height() += mnDDHeight; - aSz.Width() = std::max(aSz.Width(), Edit::CalcMinimumSizeForText(GetText()).Width()); } else { - aSz = Edit::CalcMinimumSizeForText(GetText()); + aSz.Height() = Edit::CalcMinimumSizeForText(GetText()).Height(); + aSz.Width() = mpImplLB->GetMaxEntryWidth(); } if (m_nMaxWidthChars != -1) |