update demo files
|
Before Width: | Height: | Size: 506 KiB After Width: | Height: | Size: 471 KiB |
|
Before Width: | Height: | Size: 287 KiB After Width: | Height: | Size: 339 KiB |
|
Before Width: | Height: | Size: 648 KiB After Width: | Height: | Size: 579 KiB |
|
Before Width: | Height: | Size: 303 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 502 KiB After Width: | Height: | Size: 416 KiB |
|
Before Width: | Height: | Size: 591 KiB After Width: | Height: | Size: 533 KiB |
|
Before Width: | Height: | Size: 378 KiB After Width: | Height: | Size: 2.2 MiB |
|
Before Width: | Height: | Size: 407 KiB After Width: | Height: | Size: 28 KiB |
@ -156,16 +156,14 @@ def main():
|
|||||||
print("=== Settings Overlay Demo ===")
|
print("=== Settings Overlay Demo ===")
|
||||||
print()
|
print()
|
||||||
|
|
||||||
# Find a test EPUB
|
# Use Alice in Wonderland test book (has actual content)
|
||||||
epub_dir = Path(__file__).parent.parent / 'tests' / 'data' / 'library-epub'
|
epub_path = Path(__file__).parent.parent / 'tests' / 'data' / 'test.epub'
|
||||||
epubs = list(epub_dir.glob('*.epub'))
|
|
||||||
|
|
||||||
if not epubs:
|
if not epub_path.exists():
|
||||||
print("Error: No test EPUB files found!")
|
print("Error: test.epub not found!")
|
||||||
print(f"Looked in: {epub_dir}")
|
print(f"Looked in: {epub_path}")
|
||||||
return
|
return
|
||||||
|
|
||||||
epub_path = epubs[0]
|
|
||||||
print(f"Using book: {epub_path.name}")
|
print(f"Using book: {epub_path.name}")
|
||||||
|
|
||||||
# Create reader
|
# Create reader
|
||||||
@ -182,6 +180,10 @@ def main():
|
|||||||
print(f"Loaded: {reader.book_title} by {reader.book_author}")
|
print(f"Loaded: {reader.book_title} by {reader.book_author}")
|
||||||
print()
|
print()
|
||||||
|
|
||||||
|
# Skip to a page with actual content (past cover/title pages)
|
||||||
|
for _ in range(3):
|
||||||
|
reader.next_page()
|
||||||
|
|
||||||
# Prepare frames for GIF
|
# Prepare frames for GIF
|
||||||
frames = []
|
frames = []
|
||||||
frame_duration = [] # Duration in milliseconds for each frame
|
frame_duration = [] # Duration in milliseconds for each frame
|
||||||
@ -215,8 +217,8 @@ def main():
|
|||||||
# Find actual button coordinates by querying the overlay
|
# Find actual button coordinates by querying the overlay
|
||||||
print("Querying overlay for button positions...")
|
print("Querying overlay for button positions...")
|
||||||
link_positions = {}
|
link_positions = {}
|
||||||
if reader.overlay_manager._overlay_reader:
|
if reader._active_overlay and reader._active_overlay._overlay_reader:
|
||||||
page = reader.overlay_manager._overlay_reader.manager.get_current_page()
|
page = reader._active_overlay._overlay_reader.manager.get_current_page()
|
||||||
|
|
||||||
# Scan for all links with very fine granularity to catch all buttons
|
# Scan for all links with very fine granularity to catch all buttons
|
||||||
for y in range(0, 840, 3):
|
for y in range(0, 840, 3):
|
||||||
|
|||||||