Skip to content
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

sclang: set max scroll according to req'd value #1491

Merged
merged 1 commit into from
May 30, 2015

Conversation

scztt
Copy link
Contributor

@scztt scztt commented May 24, 2015

Setting some geometry-related properties at view creation time gets a bit weird, because layout is often not calculated immediately. In case of #823, the initial layout of the view gets calculated in a slightly deferred event fired in response to .front(), meaning that when visibleOrigin_ is called, the scrollbars still haven't been adjusted according to the layed-out window contents (specifically, at creation time the max scroll value is 0). Fixing this by getting layout to happen at the right time is hard - fortunately, it looks like scrollbar behavior is smart enough that, when we request a specific visibleOrigin, we can simply increase the scrollbar max value as needed - even when manually setting a max, the scrollbars seem to re-adjust properly as the contents of the scroll area are sized.

Setting some geometry-related properties at view creation time gets a bit weird, because layout is often not calculated immediately. In case of #823, the initial layout of the view gets calculated in a slightly deferred event fired in response to .front(), meaning that when visibleOrigin_ is called, the scrollbars still haven't been adjusted according to the layed-out window contents (specifically, at creation time the max scroll value is 0). Fixing this by getting layout to happen at the right time is hard - fortunately, it looks like scrollbar behavior is smart enough that, when we request a specific visibleOrigin, we can simply increase the scrollbar max value as needed - even when manually setting a max, the scrollbars seem to re-adjust properly as the contents of the scroll area are sized.
@scztt
Copy link
Contributor Author

scztt commented May 24, 2015

Fixes #823

telephon added a commit that referenced this pull request May 30, 2015
…on-new-view

sclang: set max scroll according to req'd value
@telephon telephon merged commit b3ae470 into master May 30, 2015
@mossheim mossheim deleted the topic/fix-visible-origin-on-new-view branch January 15, 2017 21:19
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