mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
ReaderTypeset: Use formatFlexSize in onSetPageMargins
Instead of enforcing px. Also decouple the footer from the bottom margin report to make things clearer given this change.
This commit is contained in:
@@ -506,13 +506,19 @@ function ReaderTypeset:onSetPageMargins(margins, when_applied_callback)
|
||||
text = T(_([[
|
||||
Margins set to:
|
||||
|
||||
left: %1 (%2px)
|
||||
right: %3 (%4px)
|
||||
top: %5 (%6px)
|
||||
bottom: %7 (%8px)
|
||||
left: %1
|
||||
right: %2
|
||||
top: %3
|
||||
bottom: %4
|
||||
|
||||
footer: %5 px
|
||||
|
||||
Tap to dismiss.]]),
|
||||
margins[1], left, margins[3], right, margins[2], top, margins[4], bottom),
|
||||
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")),
|
||||
self.view.footer.reclaim_height and 0 or self.view.footer:getHeight()),
|
||||
dismiss_callback = when_applied_callback,
|
||||
})
|
||||
end
|
||||
|
||||
@@ -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", "mm"))))
|
||||
Notification:notify(T(_("Page gap set to %1."), optionsutil.formatFlexSize(page_gap, G_reader_settings:readSetting("dimension_units"))))
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user