-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Regression in editor buttons clipping last letter under certain circumstances #89122
Comments
Also makes the icon shift but I assume that's because of the missing letter Screen.Recording.mp4 |
Related to #88652 (comment), CC @RobProductions @Calinou |
godot/editor/themes/editor_theme_manager.cpp Lines 2448 to 2454 in f2045ba
|
I believe this comes from the "Base spacing" variable which as you can see here breaks the stylebox when it's set to < 4: Capture2024-03-04.21-09-19.movIt does seem to be limited to external themes though (or at least the one linked here which I tried) and thankfully doesn't break on default Godot UI: Capture2024-03-04.21-12-03.movFrom what I can tell Editor Scale has no bearing on it as both videos were recorded with 100% scale, but I could be wrong. The hover stylebox margins did change in #88652 as you can see here: https://github.com/godotengine/godot/pull/88652/files Though that was meant to fix the "draw extra borders" margin that should've been passed down to that. Could be breaking because the new "MainScreenButton" variation needs the same margin treatment as the flat buttons but I believe when last I tested that it also appeared cut off, hence why it has different margins from the Took a while to assemble all that because I did a fresh compilation of Godot on a new machine but now that I'm able to reproduce it I can try testing out some fixes, just might take a bit of trial and error. I don't know exactly what's wrong yet but hopefully that narrows down the search, apologies for not catching it earlier! |
It is mainly caused by the use of different minimum size styleboxes for the same button in different statuses. In this MRP, the minimum sizes of styleboxes are different in Since In addition, Finally, I'm confused by the code that calls godot/editor/themes/editor_theme_manager.cpp Lines 1822 to 1824 in a07dd0d
godot/scene/resources/style_box.cpp Lines 78 to 86 in a07dd0d
godot/scene/resources/style_box_flat.cpp Lines 35 to 38 in a07dd0d
godot/scene/resources/style_box_flat.cpp Lines 82 to 85 in a07dd0d
If it wants to use |
Good catch! I defined the Capture2024-03-06.21-45-59.mov
You're right, I do see an issue at 75% scale on the custom theme: But I believe it's only because internally it sets the margin value based on EDSCALE as you can see here: godot/editor/themes/editor_theme_manager.cpp Line 129 in a07dd0d
Hence the issue still stems from margins and correcting them as shown in the video allows it to stay constrained on all scale values too, so as far as I can tell this should resolve it for now.
The code I wrote that you see there currently mirrors an existing pattern that was there previously which I guess was a little more convoluted than it needed to be, but I tested it and you're right, it will work with There are just two things I need to figure out before I submit my PR, one is why the hover highlights on the main buttons seem to lose its rounded edge and another is cleaning up the bottom bar |
Tested versions
happens in v4.3.dev4
does not happen in 4.3.dev3, 4.3.dev2 or 4.3.dev1 (i tested)
System information
Windows 11 - 4.3.dev4.official [df78c06]
Issue description
Using the theme by passivestar https://github.com/passivestar/godot-minimal-theme with the editor on 75% scaling the last letters in the top buttons (2d, 3d, script, assetlib) get hidden on hover.
Apparently this was an issue before ( #85449 ) under the same circumstances ( #88066 ) and was solved, probably with #87335
#86378 might have re-introduced this issue but not certain
Steps to reproduce
use the theme by passivestar ( https://github.com/passivestar/godot-minimal-theme ) and set scaling to 75%
Minimal reproduction project (MRP)
this happens in editor with any project
The text was updated successfully, but these errors were encountered: