mirror of
https://gitlab.com/luk3yx/minetest-flow.git
synced 2025-07-03 15:18:05 +02:00
Bugfix
This commit is contained in:
parent
95689f6c89
commit
eff72d6323
8
init.lua
8
init.lua
@ -153,7 +153,7 @@ end
|
|||||||
|
|
||||||
local invisible_elems = {
|
local invisible_elems = {
|
||||||
style = true, listring = true, scrollbaroptions = true, tableoptions = true,
|
style = true, listring = true, scrollbaroptions = true, tableoptions = true,
|
||||||
tablecolumns = true, tooltip = true, style_type = true,
|
tablecolumns = true, tooltip = true, style_type = true, set_focus = true,
|
||||||
}
|
}
|
||||||
|
|
||||||
local DEFAULT_SPACING = 0.2
|
local DEFAULT_SPACING = 0.2
|
||||||
@ -328,12 +328,16 @@ local function expand(box)
|
|||||||
local free_space = box[w]
|
local free_space = box[w]
|
||||||
local expandable = {}
|
local expandable = {}
|
||||||
local expand_count = 0
|
local expand_count = 0
|
||||||
|
local first = true
|
||||||
for i, node in ipairs(box) do
|
for i, node in ipairs(box) do
|
||||||
local width, height = node[w] or 0, node[h] or 0
|
local width, height = node[w] or 0, node[h] or 0
|
||||||
if not invisible_elems[node.type] then
|
if not invisible_elems[node.type] then
|
||||||
if i > 1 then
|
if first then
|
||||||
|
first = false
|
||||||
|
else
|
||||||
free_space = free_space - (box.spacing or DEFAULT_SPACING)
|
free_space = free_space - (box.spacing or DEFAULT_SPACING)
|
||||||
end
|
end
|
||||||
|
|
||||||
if node.type == "list" then
|
if node.type == "list" then
|
||||||
width = width * 1.25 - 0.25
|
width = width * 1.25 - 0.25
|
||||||
height = height * 1.25 - 0.25
|
height = height * 1.25 - 0.25
|
||||||
|
Loading…
Reference in New Issue
Block a user