mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
optionsutil: Simplify the public formatFlexSize wrapper
Pull the dimension_units from in there, instead of asking callers to do that.
This commit is contained in:
@@ -514,10 +514,10 @@ Margins set to:
|
||||
footer: %5 px
|
||||
|
||||
Tap to dismiss.]]),
|
||||
optionsutil.formatFlexSize(margins[1], G_reader_settings:readSetting("dimension_units")),
|
||||
optionsutil.formatFlexSize(margins[2], G_reader_settings:readSetting("dimension_units")),
|
||||
optionsutil.formatFlexSize(margins[3], G_reader_settings:readSetting("dimension_units")),
|
||||
optionsutil.formatFlexSize(margins[4], G_reader_settings:readSetting("dimension_units")),
|
||||
optionsutil.formatFlexSize(margins[1]),
|
||||
optionsutil.formatFlexSize(margins[2]),
|
||||
optionsutil.formatFlexSize(margins[3]),
|
||||
optionsutil.formatFlexSize(margins[4]),
|
||||
self.view.footer.reclaim_height and 0 or self.view.footer:getHeight()),
|
||||
dismiss_callback = when_applied_callback,
|
||||
})
|
||||
|
||||
@@ -1094,7 +1094,7 @@ end
|
||||
|
||||
function ReaderView:onPageGapUpdate(page_gap)
|
||||
self.page_gap.height = Screen:scaleBySize(page_gap)
|
||||
Notification:notify(T(_("Page gap set to %1."), optionsutil.formatFlexSize(page_gap, G_reader_settings:readSetting("dimension_units"))))
|
||||
Notification:notify(T(_("Page gap set to %1."), optionsutil.formatFlexSize(page_gap)))
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user