Added ACC flipping of page
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user