Checkbox need to be before the sub menu arrow, not after

This commit is contained in:
Emmanuel Lepage Vallee 2014-01-30 00:03:56 -05:00
parent ebac399d72
commit b1f3190ae3
2 changed files with 7 additions and 7 deletions

View File

@ -56,7 +56,7 @@ end
local function execute_sub_menu(data,item)
if (item._private_data.sub_menu_f or item._private_data.sub_menu_m) then
local sub_menu = item._private_data.sub_menu_m or item._private_data.sub_menu_f()
local sub_menu = item._private_data.sub_menu_m or item._private_data.sub_menu_f(data,item)
if sub_menu and sub_menu.rowcount > 0 then
sub_menu.arrow_type = module.arrow_type.NONE
sub_menu.parent_item = item

View File

@ -244,6 +244,12 @@ function module:setup_item(data,item,args)
local icon = module:setup_icon(item,data)
l:add(icon)
-- Checkbox
local ck = module:setup_checked(item,data)
if ck then
lr:add(ck)
end
if item._private_data.sub_menu_f or item._private_data.sub_menu_m then
local subArrow = wibox.widget.imagebox() --TODO, make global
subArrow.fit = function(box, w, h) return subArrow._image:get_width(),item.height end
@ -255,12 +261,6 @@ function module:setup_item(data,item,args)
end
end
-- Checkbox
local ck = module:setup_checked(item,data)
if ck then
lr:add(ck)
end
-- Suffix
if args.suffix_widget then
lr:add(args.suffix_widget)