add status widget and attribute

This commit is contained in:
airstruck
2015-12-05 15:43:40 -05:00
parent 3daff0bcad
commit c21611748c
7 changed files with 62 additions and 55 deletions

View File

@@ -26,6 +26,7 @@ Widget.typeDecorators = {
radio = require(ROOT .. 'widget.radio'),
sash = require(ROOT .. 'widget.sash'),
slider = require(ROOT .. 'widget.slider'),
status = require(ROOT .. 'widget.status'),
stepper = require(ROOT .. 'widget.stepper'),
text = require(ROOT .. 'widget.text'),
}
@@ -59,7 +60,8 @@ local function metaIndex (self, property)
-- cascading attributes
-- TODO: custom accessors in attribute module?
if property == 'color' or property == 'font' or property == 'size' then
if property == 'color' or property == 'font' or property == 'size'
or property == 'status' then
local value = self.parent and self.parent[property]
if value ~= nil then return maybeCall(value, self) end
end