mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user