-
Notifications
You must be signed in to change notification settings - Fork 874
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 tab closing when trying to select partly clipped tab. #6164
Fix tab closing when trying to select partly clipped tab. #6164
Conversation
…clipped and not painting it.
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, assuming you tested it before and after and confirmed that the bug was reproducible first and then disappeared once the patch was put in.
Thanks for fixing this! (I do see that bug in my own IDE!)
Thanks @eirikbakke yes, of course. 😄 And stepped through with the debugger to see what was going on before and after the change. Been annoying me for a little while too. |
Yeah, I was just too lazy to build and test it myself :-) |
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.
Just tested. Fixes the issues for FlatLaf 👍
The same fix is needed for the Windows L&F here:
Line 169 in e5fb9c9
if (!ren.isShowCloseButton()) { |
Also tested Nimbus and Metal, but they do not have the issue because they use different painters for clipped sided, which always return zero-size rectangle from TabPainter.getCloseButtonRectangle()
. E.g. in class NimbusLeftClipPainter
.
Aqua, GTK, WinVista, WinClassic and WinXP also have such painters for clipped sides.
…en clipped and not painting it.
@DevCharly thanks, OK, done. I hadn't looked at any of the other implementations. My main dev machine doesn't run Windows, and I might not be able to test there this week. I've added the |
this issue shows that not enough use the "group by project" setting :D |
@mbien maybe you have enabled one of the options in following screenshot that are surrounded by red rectangles?
|
@DevCharly yes exactly. I have usually the bottom right checkbox enabled since I typically have many projects open at the same time. |
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.
Tested Windows L&F. Works 👍
Thanks, merging. |
Fix FlatEditorTabCellRenderer to not return close button bounds when clipped and not painting it. This seems to be the cause of #4738 and #6143