Skip to content

Commit 2647408

Browse files
committed
*Improved list scrollbar.
1 parent 0d026a3 commit 2647408

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/libs/beGUI/beGUI_Containers.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,13 @@ local List = beClass.class({
195195
if scrollBarTransparency then
196196
local widgetPos = y + 1
197197
local widgetSize = h - 2
198+
local limit = 0
198199
if self._scrollableHorizontally then
199200
widgetSize = widgetSize - 4
201+
limit = 3
200202
end
201203
local contentSize = self._maxY
202-
local barSize = math.max(math.min((widgetSize / contentSize) * widgetSize, widgetSize - 3), 8)
204+
local barSize = math.max(math.min((widgetSize / contentSize) * widgetSize, widgetSize - limit), 8)
203205
local percent = beUtils.clamp(-self._scrollY / (contentSize - widgetSize), 0, 1)
204206
local slide = widgetSize - barSize
205207
local offset = slide * percent;

0 commit comments

Comments
 (0)