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

Fix #4013: Scroll bar can get tiny for extremely long lists #4025

Merged
merged 5 commits into from Jul 15, 2016

Conversation

gDanix
Copy link
Contributor

@gDanix gDanix commented Jul 9, 2016

WARNING: This is not a 'real' solution, but a hack with the drawing parameters to have bigger scrollbars when the list being scrolled is too large.

Because of that, the scrollbar moves slightly slower than the mouse pointer actually do, so the pointer will ended up pointing ahead the scrollbar.

This would better implemented while rewriting UI system.

Currently, only vertical scrollbars are implemented. If this hack is approved, then the horizontal bars can be implemented before merge.

This solution plays with the scrollbar drawing parameters, which
makes it only a hack, not a real solution.
@Gymnasiast
Copy link
Member

This is not a fix for #592, but for #4013 by the look of it.


if(scroll->v_thumb_bottom - scroll->v_thumb_top < 20) {
double percent = (scroll->v_thumb_bottom*1.0)/view_size;
printf("percent: %f\n", percent);
Copy link
Member

Choose a reason for hiding this comment

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

I think you accidentally left this in.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but this is only a draft. If this is approved, then I'll do the same for the horizontal scrollbar and some code cleaning

@gDanix
Copy link
Contributor Author

gDanix commented Jul 10, 2016

@Gymnasiast Sorry, I thought it was because #4013 was marked as a duplicate of #592.

If this isn't really a fix for #592, I must change the name to avoid Github autoclosing #592, when it really didn't get fixed.

@Gymnasiast Gymnasiast changed the title [WIP] Fix #592: Very long object list cannot be scrolled Fix #4013: Very long object list cannot be scrolled Jul 10, 2016
@Gymnasiast
Copy link
Member

That was because Duncan only read the issue title and didn't pay attention to what #592 was actually about. If you read both issues it's very easy to see they're totally different issues.

@gDanix gDanix changed the title Fix #4013: Very long object list cannot be scrolled Fix #4013: Scroll bar can get tiny for extremely long lists Jul 11, 2016
@Gymnasiast
Copy link
Member

Gymnasiast commented Jul 12, 2016

Are you finished?

@gDanix
Copy link
Contributor Author

gDanix commented Jul 12, 2016

I couldn't test the horizontal scrollbar because I wasn't able to find a window with such a small horizontal scrollbar, but the code is very simple and is equivalent to the vertical scrollbar code, so I can not find why this should not work

@janisozaur
Copy link
Member

I can not find why this should not work

Famous last words ;)

@gDanix
Copy link
Contributor Author

gDanix commented Jul 12, 2016

@janisozaur true. In fact if there is no window with such an horizontal space, we can revert the untested change in horizontal scrollbar (diff lines 76-82), and leave changes in the vertical scrollbar (which are the important ones)

@Gymnasiast
Copy link
Member

You can leave it as it is. It's more consistent this way and not likely to cause problems.
I'll try to test it tonight.

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.

None yet

3 participants