Added the function for creating subcontexts
This commit is contained in:
parent
732d07715e
commit
bba4badb27
|
@ -7,7 +7,19 @@ local awmtk = {}
|
|||
|
||||
-- {{{ Utils
|
||||
|
||||
|
||||
awmtk.subclass = function(parent_class,instance_overrides,name)
|
||||
return setmetatable(instance_overrides,{
|
||||
__index = function(self,k)
|
||||
if rawget(self,k) then
|
||||
return rawget(self,k)
|
||||
elseif type(beautiful[name]) == "table" and beautiful[name][k] then
|
||||
return beautiful[name][k]
|
||||
elseif parent_class[k] then
|
||||
return parent_class[k]
|
||||
end
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
-- }}}
|
||||
|
||||
|
@ -17,7 +29,10 @@ local awmtk = {}
|
|||
-- Default namespace
|
||||
awmtk.default = setmetatable({}, {
|
||||
-- { Backgrounds
|
||||
|
||||
-- custom background color for highlighting elements
|
||||
bg_highlight = beautiful.bg_highlight or beautiful.bg_focus
|
||||
-- }
|
||||
-- {
|
||||
}, { __index = beautiful })
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue