Skip to content

Scroll space in Continuous View #21241

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Rohan-here
Copy link

Resolves: #11325

  • I signed the CLA
  • The title of the PR describes the problem it addresses
  • Each commit's message describes its purpose and effects, and references the issue it resolves
  • If changes are extensive, there is a sequence of easily reviewable commits
  • The code in the PR follows the coding rules
  • There are no unnecessary changes
  • The code compiles and runs on my machine, preferably after each commit individually

// contentRect is Vertically or Horizontally larger than viewport
// 1) Continuous Horizontal View
if (notation()->viewMode() == engraving::LayoutMode::LINE && viewport.width() < contentRect.width()) {
return notationContentRect().adjusted(0, -overscrollY, 0, overscrollY);
Copy link
Member

Choose a reason for hiding this comment

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

This solution has two potential disadvantages:

  • if viewport.width() < contentRect.width() and viewport.height() < contentRect.height(), you would expect that the non-adjusted notationContentRect() is returned, but instead you get notationContentRect().adjusted(0, -overscrollY, 0, overscrollY);
  • if viewport.width() is just slightly larger than contentRect.width(), then it will immediately be possible to scroll all the way past the end of the notation.

Would it be an idea to change only the line where overscrollFactor is defined, so that it is SCROLL_LIMIT_OFF_OVERSCROLL_FACTOR when the scroll area is not limited and the view mode is not continuous view, and 0.0 otherwise?

Copy link
Author

Choose a reason for hiding this comment

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

Change in overscrollFactor conflicts with possible zoom out percentage. To overcome removing zoom out percentages, I implemented user can scroll horizontally or vertically to page border only if page fits into viewbox. If page is smaller than view box than he can scroll outside as well.
I will look into your idea once again

@igorkorsukov igorkorsukov force-pushed the master branch 6 times, most recently from fa1f8d3 to 525a11a Compare February 14, 2024 09:08
@cbjeukendrup cbjeukendrup self-requested a review June 16, 2024 23:32
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.

[MU4 Issue] Continuous View - Whitespace
2 participants