-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Font size change corrupts inactive tabs #7321
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
Comments
Confirmed, thanks for reporting, will take a look later today 😉 |
The bug lies here: https://github.com/bobbylight/RSyntaxTextArea/blame/master/src/main/java/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea.java#L2067 If you modify the font size on the fly and select a tab which hasn't been opened, the result is fine. As soon as you open it once, the repain() doesn't call |
This is still not fixed |
Howdy - the RSyntaxTextArea source has changed since this ticket was opened. I'm interested in taking a look again. Can someone let me know how you're updating the font size on these already-displayed editors and let me know you believe it's failing? The following two approaches should work, with caveats, provided the editor is displayable:
In any case, let me know how to reproduce this and I'll try to get it fixed in the next RSTA release. |
Hi @bobbylight , out_EDIT.mp4Let me know if you need any addidional info to reproduce and thanks for your great work! |
@facchinm , is that a standard JTabbedPane - and thus, are the editors in each tab always in the UI until their tab is closed? Or are you removing RSyntaxTextAreas and adding new ones when tabs are clicked (or something similar like swapping out the Document)? I'm still struggling a little to see how this can happen - any call to If you're doing something like that, one possible fix on my side is to set |
We extended We don't swap Document to reuse the same https://github.com/arduino/Arduino/blob/master/app/src/processing/app/Editor.java#L122
Is there a reason why the editor must be displayable to recalculate the metrics? |
Just to give you some more context, here is how we "change tab" in the editor: https://github.com/arduino/Arduino/blob/master/app/src/processing/app/Editor.java#L1437-L1462 maybe it gives some clues maybe not... |
...and I think I fixed it by forcing a I don't know if this is the correct fix, I see that in |
I have a sketch with several tabs. If I change the font size using the menu, the active tab refreshes correctly. If I then click on another tab, the text isn't drawn correctly and overlaps (see below). If I then change the font scale the active tab refreshes correctly.
Arduino IDE 1.8.5, Arduino IDE 1.8.14 Hourly Build 2021/03/09 09:33
The text was updated successfully, but these errors were encountered: