scissor me baby

This commit is contained in:
airstruck
2015-12-08 17:14:49 -05:00
parent d11ea06503
commit 5e6cd8c29e
12 changed files with 138 additions and 71 deletions

View File

@@ -283,7 +283,9 @@ To get the calculated height, use `Widget:getHeight`.
Attribute.height = {}
function Attribute.height.set (widget, value)
value = value and math.max(value, widget.minheight or 0)
if value ~= 'auto' then
value = value and math.max(value, widget.minheight or 0)
end
widget.attributes.height = value
widget.reshape(widget.parent or widget)
end
@@ -415,6 +417,8 @@ and horizontal alignment is defined by either 'left', 'center', or 'right'.
For example, `align = 'top left'`
- This attribute cascades.
@attrib align
--]]--
Attribute.align = {}
@@ -424,6 +428,10 @@ function Attribute.align.set (widget, value)
widget.textData = nil
end
function Attribute.align.get (widget)
return widget.attributes.align or widget.parent and widget.parent.align
end
--[[--
Wrap text onto multiple lines.