Don't show partially hidden icons in toolbar
This commit is contained in:
parent
5e0dee3e18
commit
7a35e7c217
|
@ -57,7 +57,7 @@ function ToolbarView:each_item()
|
||||||
if index <= #toolbar_commands then
|
if index <= #toolbar_commands then
|
||||||
local dx = style.padding.x + (icon_w + toolbar_spacing) * (index - 1)
|
local dx = style.padding.x + (icon_w + toolbar_spacing) * (index - 1)
|
||||||
local dy = style.padding.y
|
local dy = style.padding.y
|
||||||
if dx >= self.size.x then return end
|
if dx + icon_w > self.size.x then return end
|
||||||
return toolbar_commands[index], ox + dx, oy + dy, icon_w, icon_h
|
return toolbar_commands[index], ox + dx, oy + dy, icon_w, icon_h
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue