-
Notifications
You must be signed in to change notification settings - Fork 192
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
Update scrollbar after zoom on wxGTK #496
Update scrollbar after zoom on wxGTK #496
Conversation
9230409
to
42fb869
Compare
42fb869
to
ed8865c
Compare
@@ -745,6 +745,15 @@ struct Document { | |||
#ifndef __WXMSW__ | |||
if (sw) sw->Refresh(false); | |||
#endif | |||
#ifdef __WXGTK__ | |||
if (sw) { | |||
// wxWidgets (wxGTK) does not always automatically update the scrollbar |
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.
This calls both the above Refresh
and your new code GTK, are you sure both are needed?
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.
Yes, unfortunately. I tested it with a TreeSheets documents with nested grids and this is the way I found out to remove the bug that the scrollbar is at default position (0,0) when zoomed out instead of the correct scrollbar position mirroring the position of the selection on the canvas.
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.
Bug demonstrated:
Peek.2023-08-27.17-50.mp4
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.
With this PR
Peek.2023-08-27.17-52.mp4
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.
@aardappel Do you agree with the rationale behind this PR?
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.
Yes, thanks!
No description provided.