2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00

rename footer.lua to readerfooter.lua

This commit is contained in:
chrox 2013-02-24 15:25:08 +08:00
parent 02a159eaf8
commit 86dab2ebee
2 changed files with 7 additions and 7 deletions

View File

@ -1,5 +1,5 @@
Footer = InputContainer:new{
ReaderFooter = InputContainer:new{
pageno = nil,
pages = nil,
progress_percentage = 0.0,
@ -11,7 +11,7 @@ Footer = InputContainer:new{
height = 19,
}
function Footer:init()
function ReaderFooter:init()
self.progress_bar = ProgressWidget:new{
width = math.floor(Screen:getWidth()*(self.bar_width-0.02)),
height = 7,
@ -46,18 +46,18 @@ function Footer:init()
self:update()
end
function Footer:paintTo(bb, x, y)
function ReaderFooter:paintTo(bb, x, y)
self[1]:paintTo(bb, x, y)
end
function Footer:update()
function ReaderFooter:update()
self.pageno = self.view.state.page
self.pages = self.view.document.info.number_of_pages
self.progress_bar.percentage = self.pageno / self.pages
self.progress_text.text = string.format("%d / %d", self.pageno, self.pages)
end
function Footer:onPageUpdate(pageno)
function ReaderFooter:onPageUpdate(pageno)
self.pageno = pageno
self:update()
end

View File

@ -1,4 +1,4 @@
require "ui/footer"
require "ui/reader/readerfooter"
ReaderView = WidgetContainer:new{
_name = "ReaderView",
@ -31,7 +31,7 @@ ReaderView = WidgetContainer:new{
function ReaderView:resetFooter()
if self.footer_visible then
self.footer = Footer:new{
self.footer = ReaderFooter:new{
view = self,
}
self[1] = self.footer