mirror of
https://gitlab.com/luk3yx/minetest-flow.git
synced 2025-10-23 13:53:08 +02:00
Backwards compatibility fix
This commit is contained in:
parent
cd56167c49
commit
888e384ced
10
layout.lua
10
layout.lua
@ -176,7 +176,15 @@ size_getters.scroll_container = size_getters.container
|
|||||||
function size_getters.label(node)
|
function size_getters.label(node)
|
||||||
-- Labels always have a distance of 0.5 between each line regardless of the
|
-- Labels always have a distance of 0.5 between each line regardless of the
|
||||||
-- font size
|
-- font size
|
||||||
local w, h, font_height = get_label_size(node.label, node.style, 0.5)
|
|
||||||
|
local style = node.style
|
||||||
|
if node.h and style and style.font_size then
|
||||||
|
core.log("warning", "[flow] Labels with a fixed height set will be " ..
|
||||||
|
"positioned as if font_size was not specified for backwards " ..
|
||||||
|
"compatibility reasons.")
|
||||||
|
style = nil
|
||||||
|
end
|
||||||
|
local w, h, font_height = get_label_size(node.label, style, 0.5)
|
||||||
node._flow_font_height = font_height
|
node._flow_font_height = font_height
|
||||||
return w, h
|
return w, h
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user