Add more resizing code to CGUISTKListBox
This commit is contained in:
parent
f6836998f0
commit
85e52de194
@ -161,6 +161,13 @@ void CGUISTKListBox::clear()
|
||||
}
|
||||
|
||||
|
||||
void CGUISTKListBox::updateDefaultItemHeight()
|
||||
{
|
||||
if (ItemHeightOverride == 0)
|
||||
ItemHeight = Font->getHeightPerLine() + 4;
|
||||
}
|
||||
|
||||
|
||||
void CGUISTKListBox::recalculateItemHeight()
|
||||
{
|
||||
IGUISkin* skin = Environment->getSkin();
|
||||
@ -176,9 +183,7 @@ void CGUISTKListBox::recalculateItemHeight()
|
||||
|
||||
if (Font)
|
||||
{
|
||||
if ( 0 == ItemHeightOverride )
|
||||
ItemHeight = Font->getHeightPerLine() + 4;
|
||||
|
||||
updateDefaultItemHeight();
|
||||
Font->grab();
|
||||
}
|
||||
}
|
||||
@ -470,7 +475,11 @@ void CGUISTKListBox::updateAbsolutePosition()
|
||||
}
|
||||
}
|
||||
|
||||
recalculateItemHeight();
|
||||
if (Font)
|
||||
updateDefaultItemHeight();
|
||||
ItemsIconWidth = 0;
|
||||
if (!Items.empty())
|
||||
recalculateIconWidth();
|
||||
}
|
||||
|
||||
|
||||
|
@ -181,6 +181,7 @@ namespace irr
|
||||
private:
|
||||
|
||||
void recalculateItemHeight();
|
||||
void updateDefaultItemHeight();
|
||||
void selectNew(s32 ypos, bool onlyHover=false);
|
||||
void recalculateScrollPos();
|
||||
void updateScrollBarSize(s32 size);
|
||||
|
Loading…
x
Reference in New Issue
Block a user