You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In an ItemList, names are truncated if they are too wide for the list. Usually this is done with an ellipsis ..., but when the width is small enough, no ellipsis is used, so more of the original name is preserved. This is good behavior, otherwise a label like new_script.gd, truncated to 5 characters, would appear as ne... rather than new_s.
There is some threshold for when truncation stops using ellipses. Possibly this threshold should be changed, so that ellipsis truncation is used for more narrow controls than it currently is.
The exact logic may also need tweaking. In this example, the list item named wwwwwwwwwwwwww is truncated without an ellipsis, even though visually it has room for an ellipsis.
Observed behavior in the MRP:
Godot_v4.3-stable_win64_LBndWrQWhk.mp4
Context:
I first noticed this behavior when testing #96909. That PR changed the minimum width of the script list to 100, and now the width is small enough that many script names are truncated with no ellipsis.
Observed behavior in the #96909 artifact. Not how new_script.cs file is truncated without ellipsis.
godot.windows.editor.x86_64_gaLLMuQTjM.mp4
Steps to reproduce
Open the MRP.
Adjust the HSplitContainer left and right. You can test with and without 16x16 icons.
Observe that at a certain width, some labels are truncated using an ellipsis and some are not.
It seems that this behavior isn't unique to ItemList, but in general any TextParagraph with text_overrun_behavior = OVERRUN_TRIM_ELLIPSIS
Here's demonstration with Label:
Note how there's a brief moment when "new_s" is shown, there would be space enough for either one letter or ellipses.
Tested versions
4.3
System information
Windows 10
Issue description
In an ItemList, names are truncated if they are too wide for the list. Usually this is done with an ellipsis
...
, but when the width is small enough, no ellipsis is used, so more of the original name is preserved. This is good behavior, otherwise a label likenew_script.gd
, truncated to 5 characters, would appear asne...
rather thannew_s
.There is some threshold for when truncation stops using ellipses. Possibly this threshold should be changed, so that ellipsis truncation is used for more narrow controls than it currently is.
The exact logic may also need tweaking. In this example, the list item named
wwwwwwwwwwwwww
is truncated without an ellipsis, even though visually it has room for an ellipsis.Observed behavior in the MRP:
Godot_v4.3-stable_win64_LBndWrQWhk.mp4
Context:
I first noticed this behavior when testing #96909. That PR changed the minimum width of the script list to 100, and now the width is small enough that many script names are truncated with no ellipsis.
Observed behavior in the #96909 artifact. Not how
new_script.cs
file is truncated without ellipsis.godot.windows.editor.x86_64_gaLLMuQTjM.mp4
Steps to reproduce
Open the MRP.
Adjust the HSplitContainer left and right. You can test with and without 16x16 icons.
Observe that at a certain width, some labels are truncated using an ellipsis and some are not.
Minimal reproduction project (MRP)
mrp-truncation.zip
The text was updated successfully, but these errors were encountered: