limit dropdown expansion to 20 items to make filtering feel less jarring

This commit is contained in:
Fish013
2020-02-16 20:19:22 +01:00
parent 68359e45f2
commit 7d668125d5

View File

@@ -183,7 +183,7 @@ function DropDownClass:Draw(viewPort)
local mOver, mOverComp = self:IsMouseOver()
local scrollBar = self.controls.scrollBar
local lineHeight = height - 4
self.dropHeight = lineHeight * m_min(#self.list, 30)
self.dropHeight = lineHeight * m_min(#self.list, 20)
scrollBar.y = height + 1
if y + height + self.dropHeight + 4 <= viewPort.y + viewPort.height then
-- Drop fits below body