Skip to content

Zoom toolbar#537

Open
azfoo wants to merge 7 commits into
TimeLineAnnotator:devfrom
azfoo:feat/zoom-levels
Open

Zoom toolbar#537
azfoo wants to merge 7 commits into
TimeLineAnnotator:devfrom
azfoo:feat/zoom-levels

Conversation

@azfoo

@azfoo azfoo commented May 16, 2026

Copy link
Copy Markdown
Collaborator
  • Adds ZoomToolbar with a log-scale slider (1%–1000% visual range), an unbounded spin box
  • Zoom is bounded at runtime by _apply_zoom: rejects widths below 1px or above MAX_PLAYBACK_WIDTH; UI reverts to prior zoom on rejection
  • Saves zoom ratio per file path in settings and restores it on next open; zoom is re-applied to the timeline width once media duration is known
  • Fixes a pre-existing bug where update_height never called scene.setSceneRect, causing the vertical scrollbar to be absent until the user zoomed (closes Creating a new timeline sometimes does not update scrollable vertical area #470)
  • Re-register time_x_converter listeners per test module — cross-module singleton state could corrupt coordinate math under xdist (exposed by the new zoom tests)

@azfoo azfoo requested a review from FelipeDefensor May 16, 2026 20:41
@azfoo azfoo force-pushed the feat/zoom-levels branch from 3bfc829 to 8348bdb Compare May 16, 2026 23:39
azfoo added 7 commits May 22, 2026 23:02
vertical scrollbar was not appearing on file load
- Replaces ZOOM_FACTOR / on_zoom("in"/"out") with ZOOM_MULTIPLIER = 1.25;
  view.zoom.set/in/out commands registered in TimelineUIs.
- New ZoomToolbar (bottom toolbar): [ZoomOut][log-slider][ZoomIn][%spinbox].
  Toolbar is display-only; synced via Post.ZOOM_TOOLBAR_UPDATE.
- _apply_zoom rejects new_width < 1 or > MAX_PLAYBACK_WIDTH.
- Adds Get.CURRENT_ZOOM (owned by TimelineUIs) and Get.ZOOM_REFERENCE_WIDTH.
- settings.get_file_zoom / save_file_zoom store the ratio at
  private/recent_files/{path}/zoom in QSettings.
- FileManager.save() fetches Get.CURRENT_ZOOM and passes it to
  update_recent_files.
- TimelineUIs._on_file_loaded reads the stored ratio, sets self._zoom,
  and posts ZOOM_TOOLBAR_UPDATE (display only; _on_duration_available
  applies it once duration is known).
@azfoo azfoo force-pushed the feat/zoom-levels branch from 8348bdb to 08efde9 Compare May 22, 2026 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant