[Libreoffice-commits] core.git: vcl/source
Caolán McNamara
caolanm at redhat.com
Wed Jul 3 06:51:37 PDT 2013
vcl/source/control/combobox.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 67249b4aa56bf38c4c573226a06d293e0415bbea
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jul 3 14:51:01 2013 +0100
readjust the combobox optimal size calculation, needs to be more stable
Change-Id: I1e9b07e5e5e53ae62baa77610f47083b580eaf7d
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 35f2e6f..77735c8 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)
More information about the Libreoffice-commits
mailing list