MenuSorter: some documentation

MenuSorter: forgot to add plugin style change

MenuSorter: worked out the final quirks

* Menu always compressed into tables without missing indexes for ipairs compatibility
* Orphans attached
* Separators no longer count as items
This commit is contained in:
Frans de Jonge
2017-03-03 16:03:12 +01:00
parent 56659ddb20
commit 8f31a81601
16 changed files with 102 additions and 45 deletions

View File

@@ -440,22 +440,19 @@ function TouchMenu:updateItems()
local item = self.item_table[i]
-- due to the menu ordering system index can be missing
if item then
if item.text == "KOMenu:separator" then
if c ~= self.perpage then
-- insert split line
table.insert(self.item_group, self.split_line)
end
else
local item_tmp = TouchMenuItem:new{
item = item,
menu = self,
dimen = Geom:new{
w = self.item_width,
h = self.item_height,
},
show_parent = self.show_parent,
}
table.insert(self.item_group, item_tmp)
local item_tmp = TouchMenuItem:new{
item = item,
menu = self,
dimen = Geom:new{
w = self.item_width,
h = self.item_height,
},
show_parent = self.show_parent,
}
table.insert(self.item_group, item_tmp)
if item.separator and c ~= self.perpage then
-- insert split line
table.insert(self.item_group, self.split_line)
end
end
else