Reflowable documents: fix sync T/B margins (#13439)
Some checks are pending
macos / macOS 13 x86-64 🔨15.2 🎯10.15 (push) Waiting to run
macos / macOS 14 ARM64 🔨15.4 🎯11.0 (push) Waiting to run

This commit is contained in:
hius07
2025-03-21 13:16:58 +02:00
committed by GitHub
parent 47ff612417
commit 3ebdfffd01
2 changed files with 6 additions and 2 deletions

View File

@@ -511,7 +511,11 @@ function ReaderTypeset:onSetPageTopAndBottomMargin(t_b_margins, when_applied_cal
end
function ReaderTypeset:onSyncPageTopBottomMargins(toggle, when_applied_callback)
self.sync_t_b_page_margins = not self.sync_t_b_page_margins
if toggle == nil then
self.sync_t_b_page_margins = not self.sync_t_b_page_margins
else
self.sync_t_b_page_margins = toggle
end
if self.sync_t_b_page_margins then
-- Adjust current top and bottom margins if needed
if self.unscaled_margins[2] ~= self.unscaled_margins[4] then

View File

@@ -399,9 +399,9 @@ function Profiles:getProfileFromCurrentBookSettings(new_name)
"word_expansion",
"visible_pages",
"h_page_margins",
"sync_t_b_page_margins",
"t_page_margin",
"b_page_margin",
"sync_t_b_page_margins",
"view_mode",
"block_rendering_mode",
"render_dpi",