mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 08:49:15 +00:00
If we have no dropdown height give ourselves a minimum height of 5
items or max items (whichever is less).
This commit is contained in:
parent
0393d43c8e
commit
acb308af67
1 changed files with 12 additions and 2 deletions
|
@ -1195,12 +1195,22 @@ static void CBDropDown( LPHEADCOMBO lphc )
|
||||||
if (nItems > 0)
|
if (nItems > 0)
|
||||||
{
|
{
|
||||||
int nHeight;
|
int nHeight;
|
||||||
|
int nIHeight;
|
||||||
|
|
||||||
nHeight = (int)SendMessageW(lphc->hWndLBox, LB_GETITEMHEIGHT, 0, 0);
|
nIHeight = (int)SendMessageW(lphc->hWndLBox, LB_GETITEMHEIGHT, 0, 0);
|
||||||
nHeight *= nItems;
|
|
||||||
|
nHeight = nIHeight*nItems;
|
||||||
|
|
||||||
if (nHeight < nDroppedHeight - COMBO_YBORDERSIZE())
|
if (nHeight < nDroppedHeight - COMBO_YBORDERSIZE())
|
||||||
nDroppedHeight = nHeight + COMBO_YBORDERSIZE();
|
nDroppedHeight = nHeight + COMBO_YBORDERSIZE();
|
||||||
|
|
||||||
|
if (nDroppedHeight < nIHeight)
|
||||||
|
{
|
||||||
|
if (nItems < 5)
|
||||||
|
nDroppedHeight = nHeight;
|
||||||
|
else
|
||||||
|
nDroppedHeight = 5*nIHeight;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*If height of dropped rectangle gets beyond a screen size it should go up, otherwise down.*/
|
/*If height of dropped rectangle gets beyond a screen size it should go up, otherwise down.*/
|
||||||
|
|
Loading…
Reference in a new issue