shortcut attrib: allow multiple shortcuts per widget

This commit is contained in:
airstruck
2016-01-27 16:56:39 -05:00
parent 0c33538de9
commit f9a8ffa2e2
3 changed files with 32 additions and 16 deletions

View File

@@ -176,6 +176,8 @@ local function initialize (self)
shortcut = ' '
edgeType = 'menu.expander'
else
--TODO: only displays first of multiple shortcuts, change this?
if type(shortcut) == 'table' then shortcut = shortcut[1] end
shortcut = shortcut:gsub('%f[%w].', string.upper) -- :gsub('-', '+')
end
self.height = font:getLineHeight() + pad * 2