markdown: Fix code block scrollbars flashing on vertical scroll#50817
markdown: Fix code block scrollbars flashing on vertical scroll#50817MrSubidubi merged 2 commits intozed-industries:mainfrom
Conversation
There was a problem hiding this comment.
Thank you for this, but I do not think this is the best solution for the issue at hand. I think we should rather check whether we can modify the PartialEq impl for the ScrollbarLayoutState so that this does not happen. I'd suspect we can instead of comparing the entire bounds compare just the size of the bounds, as that should not change. But I think this might be a more sensible fix - the caller should not be bothered with this. What do you think?
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
531e30f to
d2f93e6
Compare
|
Hi @MrSubidubi , You are right. Now, modify the ScrollbarLayout, and the effect is as follows: 2026-03-05.21.28.47.mov |
MrSubidubi
left a comment
There was a problem hiding this comment.
This looks much better, thank you!
I am not sure as to whether we need the track bounds or the reserved space here too though - both were not present before. Can we not remove these? IIRC we do not really update these anyway for a thumb layout between frames at least.
Good point — I agree, we don’t need track_bounds or reserved_space in this equality check, and I removed both. |
MrSubidubi
left a comment
There was a problem hiding this comment.
Nice find and fix, thanks for the follow-ups!
Release Notes:
before:
When there are many code blocks, scrolling through markdown will display a horizontal scrollbar (when the mouse is not inside a code block).
2026-03-05.20.07.57.mov
after:
When scrolling markdown, do not display the horizontal scrollbar when the mouse is not in a code block.
2026-03-05.20.06.27.mov