Kaydet (Commit) c7e7160f authored tarafından Caolán McNamara's avatar Caolán McNamara

Calc optimal size of *dropdown* metricboxes similar to normal dropdowns

Change-Id: I6f79594cb01d9577c66ec5897459c37513cd35f3
üst 942501b6
...@@ -1005,7 +1005,16 @@ NumericBox::NumericBox( Window* pParent, const ResId& rResId ) : ...@@ -1005,7 +1005,16 @@ NumericBox::NumericBox( Window* pParent, const ResId& rResId ) :
Size NumericBox::CalcMinimumSize() const Size NumericBox::CalcMinimumSize() const
{ {
return calcMinimumSize(*this, *this); Size aRet(calcMinimumSize(*this, *this));
if (IsDropDownBox())
{
Size aComboSugg(ComboBox::CalcMinimumSize());
aRet.Width() = std::max(aRet.Width(), aComboSugg.Width());
aRet.Height() = std::max(aRet.Height(), aComboSugg.Height());
}
return aRet;
} }
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
...@@ -1948,7 +1957,16 @@ MetricBox::MetricBox( Window* pParent, const ResId& rResId ) : ...@@ -1948,7 +1957,16 @@ MetricBox::MetricBox( Window* pParent, const ResId& rResId ) :
Size MetricBox::CalcMinimumSize() const Size MetricBox::CalcMinimumSize() const
{ {
return calcMinimumSize(*this, *this); Size aRet(calcMinimumSize(*this, *this));
if (IsDropDownBox())
{
Size aComboSugg(ComboBox::CalcMinimumSize());
aRet.Width() = std::max(aRet.Width(), aComboSugg.Width());
aRet.Height() = std::max(aRet.Height(), aComboSugg.Height());
}
return aRet;
} }
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment