|
|
|
@ -50,6 +50,7 @@ local KeyValueTitle = VerticalGroup:new{
|
|
|
|
|
title = "",
|
|
|
|
|
tface = Font:getFace("tfont"),
|
|
|
|
|
align = "left",
|
|
|
|
|
use_top_page_count = false,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function KeyValueTitle:init()
|
|
|
|
@ -74,19 +75,6 @@ function KeyValueTitle:init()
|
|
|
|
|
self.close_button,
|
|
|
|
|
})
|
|
|
|
|
-- page count and separation line
|
|
|
|
|
self.page_cnt = FrameContainer:new{
|
|
|
|
|
padding = Size.padding.default,
|
|
|
|
|
margin = 0,
|
|
|
|
|
bordersize = 0,
|
|
|
|
|
background = Blitbuffer.COLOR_WHITE,
|
|
|
|
|
-- overlap offset x will be updated in setPageCount method
|
|
|
|
|
overlap_offset = {0, -15},
|
|
|
|
|
TextWidget:new{
|
|
|
|
|
text = "", -- page count
|
|
|
|
|
fgcolor = Blitbuffer.COLOR_GREY,
|
|
|
|
|
face = Font:getFace("smallffont"),
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
self.title_bottom = OverlapGroup:new{
|
|
|
|
|
dimen = { w = self.width, h = Size.line.thick },
|
|
|
|
|
LineWidget:new{
|
|
|
|
@ -94,8 +82,23 @@ function KeyValueTitle:init()
|
|
|
|
|
background = Blitbuffer.COLOR_GREY,
|
|
|
|
|
style = "solid",
|
|
|
|
|
},
|
|
|
|
|
self.page_cnt,
|
|
|
|
|
}
|
|
|
|
|
if self.use_top_page_count then
|
|
|
|
|
self.page_cnt = FrameContainer:new{
|
|
|
|
|
padding = Size.padding.default,
|
|
|
|
|
margin = 0,
|
|
|
|
|
bordersize = 0,
|
|
|
|
|
background = Blitbuffer.COLOR_WHITE,
|
|
|
|
|
-- overlap offset x will be updated in setPageCount method
|
|
|
|
|
overlap_offset = {0, -15},
|
|
|
|
|
TextWidget:new{
|
|
|
|
|
text = "", -- page count
|
|
|
|
|
fgcolor = Blitbuffer.COLOR_GREY,
|
|
|
|
|
face = Font:getFace("smallffont"),
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
table.insert(self.title_bottom, self.page_cnt)
|
|
|
|
|
end
|
|
|
|
|
table.insert(self, self.title_bottom)
|
|
|
|
|
table.insert(self, VerticalSpan:new{ width = Size.span.vertical_large })
|
|
|
|
|
end
|
|
|
|
@ -248,6 +251,7 @@ local KeyValuePage = InputContainer:new{
|
|
|
|
|
height = nil,
|
|
|
|
|
-- index for the first item to show
|
|
|
|
|
show_page = 1,
|
|
|
|
|
use_top_page_count = false,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function KeyValuePage:init()
|
|
|
|
@ -365,6 +369,7 @@ function KeyValuePage:init()
|
|
|
|
|
title = self.title,
|
|
|
|
|
width = self.item_width,
|
|
|
|
|
height = self.item_height,
|
|
|
|
|
use_top_page_count = self.use_top_page_count,
|
|
|
|
|
kv_page = self,
|
|
|
|
|
}
|
|
|
|
|
-- setup main content
|
|
|
|
|