mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
UI: Support appending the value in pixels when formating metric/imperial dimensions
This commit is contained in:
@@ -63,7 +63,14 @@ function optionsutil.formatFlexSize(value, unit)
|
||||
-- We don't so subpixel positioning ;)
|
||||
fmt = "%d (%d %s)"
|
||||
end
|
||||
return string.format(fmt, size, convertSizeTo(size, unit), shown_unit)
|
||||
|
||||
if G_reader_settings:isTrue("dimension_units_append_px") and unit ~= "px" then
|
||||
local px_str = C_("Pixels", "px")
|
||||
return string.format(fmt .. " [%d %s]", size, convertSizeTo(size, unit), shown_unit,
|
||||
convertSizeTo(size, "px"), px_str)
|
||||
else
|
||||
return string.format(fmt, size, convertSizeTo(size, unit), shown_unit)
|
||||
end
|
||||
end
|
||||
|
||||
function optionsutil.showValues(configurable, option, prefix, document, unit)
|
||||
|
||||
Reference in New Issue
Block a user