minor improvements

This commit is contained in:
airstruck
2015-12-10 16:05:54 -05:00
parent bcfed7b737
commit c8ca310811
20 changed files with 160 additions and 108 deletions

View File

@@ -264,7 +264,9 @@ with this widget.
Attribute.width = {}
function Attribute.width.set (widget, value)
value = value and math.max(value, widget.minwidth or 0)
if value ~= 'auto' then
value = value and math.max(value, widget.minwidth or 0)
end
widget.attributes.width = value
if widget.wrap then
widget.textData = nil
@@ -453,6 +455,8 @@ Should contain `true` for multiline text, or `false` or `nil`
for a single line. Even text containing line breaks will display
as a single line when this attribute is not set to `true`.
- This attribute cascades.
@attrib wrap
--]]--
Attribute.wrap = {}
@@ -462,6 +466,10 @@ function Attribute.wrap.set (widget, value)
widget.textData = nil
end
function Attribute.wrap.get (widget)
return widget.attributes.wrap or widget.parent and widget.parent.wrap
end
--[[--
Visual Attributes.