From 2754d996c4da3a4f69f56497fd41fcfb50e18fae Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Sat, 31 Mar 2012 14:32:36 +0200 Subject: [PATCH] move memory info to top of page This allows section name to be displayed on bottom, and it won't push memory info out of screen --- unireader.lua | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/unireader.lua b/unireader.lua index 148c2acc5..2ce78e177 100644 --- a/unireader.lua +++ b/unireader.lua @@ -817,15 +817,20 @@ function UniReader:showMenu() end renderUtf8Text(fb.bb, 10, ypos+6, face, fhash, "Page: "..self.pageno.."/"..self.doc:getPages().. - " "..cur_section.. - " Memory: ".. - math.ceil( self.cache_current_memsize / 1024 ).."/"..( self.cache_max_memsize / 1024 ).. - " "..( self.cache_item_max_pixels / 1024 ).." "..( self.doc:getCacheSize() / 1024 ).." k", - true) + " "..cur_section, true) ypos = ypos + 15 blitbuffer.progressBar(fb.bb, 10, ypos, width-20, 15, 5, 4, load_percent, 8) + + -- display memory on top of page + fb.bb:paintRect(0, 0, width, 15+6*2, 0) + renderUtf8Text(fb.bb, 10, 15+6, face, fhash, + "Memory: ".. + math.ceil( self.cache_current_memsize / 1024 ).."/"..( self.cache_max_memsize / 1024 ).. + " "..( self.cache_item_max_pixels / 1024 ).." "..( self.cache_document_size / 1024 ).." k", + true) + fb:refresh(1) while 1 do local ev = input.waitForEvent()