simplify style system

This commit is contained in:
airstruck
2015-12-07 04:22:36 -05:00
parent 367535ad33
commit 69703fdce0
41 changed files with 2227 additions and 292 deletions

View File

@@ -1,6 +1,14 @@
--[[--
A check box.
Check boxes toggle their @{attribute.value|value} attribute between
`true` and `false` when pressed.
Changing the value of a check box causes it to change its appearance to
indicate its value. The standard themes use the @{attribute.icon|icon}
attribute for this purpose. If a custom icon is provided when using the
standard themes, the widget's value should be indicated in some other way.
@widget check
--]]--
@@ -9,10 +17,5 @@ return function (self)
self.value = not self.value
end)
self:onChange(function ()
local subtype = self.value and 'check.checked' or 'check.unchecked'
self.type = { 'check', subtype }
end)
self.value = not not self.value
end