Skip to content

Zoom toolbar#537

Merged
FelipeDefensor merged 11 commits into
TimeLineAnnotator:devfrom
azfoo:feat/zoom-levels
Jun 23, 2026
Merged

Zoom toolbar#537
FelipeDefensor merged 11 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 2 times, most recently from 8348bdb to 08efde9 Compare May 22, 2026 22:05

@FelipeDefensor FelipeDefensor left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So cool! Thanks :). I debounced the text entry and made the magnifiers a bit smaller. If you are okay with that, feel free to merge.

azfoo added 7 commits June 23, 2026 13:21
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 5800f85 to 9322b4b Compare June 23, 2026 12:22
CURRENT_ZOOM, ZOOM_REFERENCE_WIDTH and ZOOM_TOOLBAR_UPDATE were wedged
mid-list; move them to the end so the enums stay ordered.
- setKeyboardTracking(False): commit on Enter/focus-out, not per keystroke
- 16px icons + matching 12px slider handle
Cover the log-scale slider round-trip, spin box commit, toolbar sync on
ZOOM_TOOLBAR_UPDATE, and the reject-and-revert path.
@azfoo

azfoo commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator Author

Looks sensible! 0.6.3 or 0.7.0?

also uses slightly more contrasting colours, especially in light mode.
@FelipeDefensor FelipeDefensor merged commit b1d21d5 into TimeLineAnnotator:dev Jun 23, 2026
11 checks passed
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.

2 participants