optionsutil: Rename real_size_string to formatFlexSize, and make it public

Use it in the ReaderView:onPageGapUpdate notification, instead of
enforcing "px" there.
This commit is contained in:
NiLuJe
2024-09-12 21:00:21 +02:00
parent d537ef5c76
commit f8890a310d
2 changed files with 15 additions and 15 deletions

View File

@@ -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 (%2 px)."), page_gap, self.page_gap.height))
Notification:notify(T(_("Page gap set to %1."), optionsutil.formatFlexSize(page_gap, G_reader_settings:readSetting("dimension_units", "mm"))))
return true
end