Skip to content

Comments

Panning/zooming improvements and fixes, round 2#554

Open
filip-hejsek wants to merge 4 commits intoTypesettingTools:masterfrom
filip-hejsek:video_panning/pr2
Open

Panning/zooming improvements and fixes, round 2#554
filip-hejsek wants to merge 4 commits intoTypesettingTools:masterfrom
filip-hejsek:video_panning/pr2

Conversation

@filip-hejsek
Copy link
Contributor

A few additional fixes that didn't make it into the first round:

  • Fix the value in the zoom box being incorrect when using content zoom in detached mode
  • Don't resize/move the video when resizing the window in detached mode and panning/zooming is active
Video comparison
before.webm
after.webm

- Never modify viewportSize outside of the added UpdateViewportSize()
- Set a sane initial size in the construtor instead of haphazardly doing it in Render()
- Ensure that the viewport and client sizes do not get out of sync in free size mode
- Also update the size before positioning video when the tool changes (but see the added TODO)
The window zoom value was calculated incorrectly in free size mode when
content zoom was active.
Comment on lines 617 to 621
// FitClientSizeToVideo fits the window to the video, which we don't want to do
GetGrandParent()->Layout();
// TODO Is the following really necessary? Wouldn't it be taken care of by OnSizeEvent?
UpdateViewportSize(true);
PositionVideo();
Copy link
Contributor Author

@filip-hejsek filip-hejsek Feb 20, 2026

Choose a reason for hiding this comment

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

There is one remaining TODO: previously, this code called PositionVideo() without first updating the viewport size. This is either:

  • broken, because the video will be positioned with the wrong viewportSize,
  • or unnecessary, because the positioning has already been done or will later be redone by OnSizeEvent().

I'm not sure which.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And I don't know how to test this because for me, changing the tool never resizes the video.

@filip-hejsek filip-hejsek marked this pull request as draft February 21, 2026 04:01
@filip-hejsek

This comment was marked as outdated.

@filip-hejsek filip-hejsek marked this pull request as ready for review February 21, 2026 04:10
@filip-hejsek
Copy link
Contributor Author

filip-hejsek commented Feb 21, 2026

Actually, it was because I overwrote my video scroll action settings by running an old version of Aegisub, sorry for the noise.

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