-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
Add Auto width
behavior to ItemList
#93270
Add Auto width
behavior to ItemList
#93270
Conversation
Please ask if the original author has abandoned their work, otherwise there's no reason to take it over, please communicate with other developers Regardless you need to cite them as a coauthor as you've copied their code, like so:
The empty line matters |
c9da14a
to
09785a5
Compare
@AThousandShips Thank you for bringing this to my attention and asking Althar93 for me. I'll keep it in mind for next time. |
Am I right that the auto_width documentation must be written below auto_height to solve the failling check? |
Yes it has to be alphabetical, use |
09785a5
to
33100c3
Compare
33100c3
to
7a1bb4c
Compare
7a1bb4c
to
6637a5c
Compare
6637a5c
to
12e1a10
Compare
12e1a10
to
0bf1a5d
Compare
Since Althar93 has not responded to the question 5 months ago about continuing his work (#39848 (comment)) and his last commit in #39848 was 4 years ago, would it be possible to review these changes already, or would you prefer to wait? |
0bf1a5d
to
c10879f
Compare
The feature is implemented correctly, but it has problems with fitting text. See the above comment. |
a39901d
to
d532eee
Compare
The text is no longer cut, but there is some excessive margin on the right. godot.windows.editor.dev.x86_64_5SeNSEtuhg.mp4 |
I noticed I had |
This comment was marked as off-topic.
This comment was marked as off-topic.
d532eee
to
7331249
Compare
7331249
to
ce9ec99
Compare
I applied the requested changes and fixed a bug that caused the right margin to be too wide when more than one column was used. |
The margin problem is fixed. godot.windows.editor.dev.x86_64_8g3HH9T339.mp4 |
ce9ec99
to
aa4824e
Compare
I fixed the column update problem. I have noticed that after hiding the visibility of the scrollbar, the size is updated about one pixel too late. I could not figure out what is causing this problem. 2024-10-03.08-50-46.mp4Thank you for your quick replies and your patience testing my code so many times! |
aa4824e
to
ac1dbc7
Compare
Co-authored-by: Craig Hupin <althar93@hotmail.com>
ac1dbc7
to
1e1dbd8
Compare
Thanks! |
I have rewritten the PR #39848 which implemented a
Auto width
functionality in the ItemList node, but never got rebased. It should be the same behavior like using theAuto height
feature.I had the problem that the last 2 letters of a word were not shown. That's why I added 6 pixels to the calculation in line 1481 (item_list.cpp) Please let me know if it is acceptable to hard-code this value.
Closes #31504
This is my first PR at the GodotEngine. Please tell me if I have done any mistakes or if there is anything I can improve.