Added ACC flipping of page
Python CI / test (3.12) (push) Successful in 7m18s
Python CI / test (3.13) (push) Successful in 7m7s

This commit is contained in:
2025-11-11 12:58:34 +01:00
parent 70c0b4a1f2
commit a1775baa76
6 changed files with 635 additions and 7 deletions
+27
View File
@@ -197,6 +197,7 @@ def generate_settings_overlay(
line_spacing: int = 5,
inter_block_spacing: int = 15,
word_spacing: int = 0,
font_family: str = "Default",
page_size: tuple = (800, 1200)
) -> str:
"""
@@ -210,6 +211,7 @@ def generate_settings_overlay(
line_spacing: Current line spacing in pixels
inter_block_spacing: Current inter-block spacing in pixels
word_spacing: Current word spacing in pixels
font_family: Current font family ("Default", "SERIF", "SANS", "MONOSPACE")
page_size: Page dimensions (width, height) for sizing the overlay
Returns:
@@ -218,6 +220,15 @@ def generate_settings_overlay(
# Format current values for display
font_percent = int(font_scale * 100)
# Map font family names to display names
font_display_names = {
"Default": "Document Default",
"SERIF": "Serif",
"SANS": "Sans-Serif",
"MONOSPACE": "Monospace"
}
font_family_display = font_display_names.get(font_family, font_family)
html = f'''
<!DOCTYPE html>
<html>
@@ -237,6 +248,22 @@ def generate_settings_overlay(
</p>
<div style="margin: 15px 0;">
<p style="padding: 12px; margin: 5px 0; background-color: #f0f0f0; border-left: 3px solid #6f42c1;">
<b>Font Family: {font_family_display}</b>
</p>
<p style="margin: 5px 0; background-color: #f0f0f0;">
<a href="setting:font_family_default" style="text-decoration: none; color: #000; display: block; padding: 12px;">Document Default</a>
</p>
<p style="margin: 5px 0; background-color: #f0f0f0;">
<a href="setting:font_family_serif" style="text-decoration: none; color: #000; display: block; padding: 12px;">Serif</a>
</p>
<p style="margin: 5px 0; background-color: #f0f0f0;">
<a href="setting:font_family_sans" style="text-decoration: none; color: #000; display: block; padding: 12px;">Sans-Serif</a>
</p>
<p style="margin: 5px 0; background-color: #f0f0f0;">
<a href="setting:font_family_monospace" style="text-decoration: none; color: #000; display: block; padding: 12px;">Monospace</a>
</p>
<p style="padding: 12px; margin: 5px 0; background-color: #f0f0f0; border-left: 3px solid #007bff;">
<b>Font Size: {font_percent}%</b>
</p>