Status bar: major UI makeover (#11678)

reviewable/pr11872/r1
SomeGuy 4 weeks ago committed by GitHub
parent 40814bf12b
commit e859109885
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -211,7 +211,7 @@ function ReaderCoptListener:getAltStatusBarMenu()
separator = true,
sub_item_table = {
{
text = _("About alternate status bar"),
text = _("About alt status bar"),
keep_menu_open = true,
callback = function()
UIManager:show(InfoMessage:new{
@ -294,15 +294,18 @@ function ReaderCoptListener:getAltStatusBarMenu()
},
{
text_func = function()
local status = _("off")
local status = _("Battery status")
if self.battery == 1 then
if self.battery_percent == 1 then
status = _("percentage")
status = _("Battery status: percentage")
else
status = _("icon")
status = _("Battery status: icon")
end
end
return T(_("Battery status: %1"), status)
return status
end,
checked_func = function()
return self.battery == 1
end,
sub_item_table = {
{

File diff suppressed because it is too large Load Diff

@ -253,7 +253,7 @@ describe("Readerfooter module", function()
footer.footer_text.text)
-- disable show all at once, page progress should be on the first
tapFooterMenu(fake_menu, "Show all at once")
tapFooterMenu(fake_menu, "Show all selected items at once")
assert.are.same('1 / 2', footer.footer_text.text)
-- disable page progress, time should follow
@ -269,7 +269,7 @@ describe("Readerfooter module", function()
assert.are.same('0%', footer.footer_text.text)
-- disable battery, percentage should follow
tapFooterMenu(fake_menu, "Battery status".." ()")
tapFooterMenu(fake_menu, "Battery percentage".." ()")
assert.are.same('⤠ 50%', footer.footer_text.text)
-- disable percentage, book time to read should follow
@ -277,15 +277,15 @@ describe("Readerfooter module", function()
assert.are.same('⏳ N/A', footer.footer_text.text)
-- disable book time to read, chapter time to read should follow
tapFooterMenu(fake_menu, "Book time to read".." (⏳)")
tapFooterMenu(fake_menu, "Time left to finish book".." (⏳)")
assert.are.same('⤻ N/A', footer.footer_text.text)
-- disable chapter time to read, text should be empty
tapFooterMenu(fake_menu, "Chapter time to read".." (⤻)")
tapFooterMenu(fake_menu, "Time left to finish chapter".." (⤻)")
assert.are.same('', footer.footer_text.text)
-- reenable chapter time to read, text should be chapter time to read
tapFooterMenu(fake_menu, "Chapter time to read".." (⤻)")
tapFooterMenu(fake_menu, "Time left to finish chapter".." (⤻)")
assert.are.same('⤻ N/A', footer.footer_text.text)
readerui:closeDocument()
readerui:onClose()
@ -528,7 +528,7 @@ describe("Readerfooter module", function()
assert.is.same(1, found)
-- disable auto refresh time
tapFooterMenu(fake_menu, "Auto refresh")
tapFooterMenu(fake_menu, "Auto refresh items")
found = 0
for _,task in ipairs(UIManager._task_queue) do
if task.action == footer.autoRefreshFooter then
@ -538,7 +538,7 @@ describe("Readerfooter module", function()
assert.is.same(0, found)
-- enable auto refresh time again
tapFooterMenu(fake_menu, "Auto refresh")
tapFooterMenu(fake_menu, "Auto refresh items")
found = 0
for _,task in ipairs(UIManager._task_queue) do
if task.action == footer.autoRefreshFooter then
@ -699,7 +699,7 @@ describe("Readerfooter module", function()
-- test in all at once mode
tapFooterMenu(fake_menu, "Progress percentage".." (⤠)")
tapFooterMenu(fake_menu, "Show all at once")
tapFooterMenu(fake_menu, "Show all selected items at once")
assert.is.same(false, footer.has_no_mode)
tapFooterMenu(fake_menu, "Progress percentage".." (⤠)")
assert.is.same(true, footer.has_no_mode)

Loading…
Cancel
Save