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

include scrollbar width in optimalsize if vert scrollbar is always shown

Change-Id: I9704b5becf6f0003233be2b3aa78b4b21a91fae7
üst cc71e03d
...@@ -1291,11 +1291,19 @@ Size ListBox::CalcMinimumSize() const ...@@ -1291,11 +1291,19 @@ Size ListBox::CalcMinimumSize() const
aSz = CalcSubEditSize(); aSz = CalcSubEditSize();
bool bAddScrollWidth = false;
if (IsDropDownBox()) if (IsDropDownBox())
{ {
aSz.Height() += 4; // add a space between entry and border aSz.Height() += 4; // add a space between entry and border
aSz.Width() += 4; // add a little breathing space 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 // 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 // see how large the edit area inside is to estimate what is needed for the dropdown
ImplControlValue aControlValue; ImplControlValue aControlValue;
......
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