-
Notifications
You must be signed in to change notification settings - Fork 21
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
Fix horizontal scrollbar #161
Conversation
541564b
to
d15fd2a
Compare
c1ce681
to
79df4f8
Compare
Now they actually reflect what they are about
* Get rid of misleading height property (a visible area height is needed instead) * MeasureContent only uses width, so replace Rect param * Rename Scrollbar Rects to make their purpose more clear * Document code blocks to clarify a little better what happens
rect.Heigth does not need the correction for the ScrollbarSize when not building. It does not have the correction when it is building. So with this fix both the building and not building states use the same rect.Height.
Possible since last fix
The height of the horizontal scrollbar is already taken care of by Scrollable. So it sohuld not be part of the height calculation. The calculation got messed up, when ScrollbarSize != 1 indicating the old calculations were wrong already.
It does not 'de-highlight' and it was only active for the Summary view (making it more consistent with the rest of YAFC)
79df4f8
to
4a8c135
Compare
I'm still seeing a .5f vertical offset in the hit testing for both scrollbars. Is that just a me thing? Good work on all the documentation and renaming |
I cannot reproduce the .5f offset. I tried with both a 1f and a 4f scrollbar sizes, and with either size clicks that are just outside of the 'scroller' are not registered and you cannot drag it. I see only two (visual) glitches:
|
Veger can't reproduce issue I'm seeing, and it's minor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I can't explain where the 0.5f vertical offset issue comes from, and veger can't reproduce it, so I'm going to ignore it.
I figured out that clicking the horizontal scrollbar was not possible because the 'click test' area did not match the actual drawn rectangle. This got fixed by d9f8151.
In order to figure this out, I did some major documenting/cleanup to get an understanding of what Scrollable class was (intending) to do.
I hope that all new variable/field names make more sense now, if not let me know and we can figure out how to further improve them.
While I was at it I found some other 'oddities' that I fixed/improved:
I assume it would be easiest to review ecah commit separately, as the cleanup shuffled/renames quite come code. Which is much more apparent when reviewing the separate commits.