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

Make status bar prefix compact items a bit more compact (#7153)

For battery level, show icon only
Reduce separator between items to " " from "  "
This commit is contained in:
Jason Benwell 2021-01-16 09:30:43 -05:00 committed by GitHub
parent 8bf829da0a
commit cd6e2d9975
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -176,7 +176,11 @@ local footerTextGeneratorMap = {
prefix = ""
end
end
return BD.wrap(prefix) .. batt_lvl .. "%"
if symbol_type == "compact_items" then
return BD.wrap(prefix)
else
return BD.wrap(prefix) .. batt_lvl .. "%"
end
else
return BD.wrap(prefix) .. " " .. (powerd:isCharging() and "+" or "") .. batt_lvl .. "%"
end
@ -1749,6 +1753,9 @@ function ReaderFooter:genFooterText() end
function ReaderFooter:genAllFooterText()
local info = {}
local separator = " "
if self.settings.item_prefix == "compact_items" then
separator = " "
end
if self.settings.items_separator == "bar" or self.settings.items_separator == nil then
separator = " | "
elseif self.settings.items_separator == "bullet" then