Skip to content
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 HScrollbar to ItemList when max_columns == 0 #99050

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

havi05
Copy link
Contributor

@havi05 havi05 commented Nov 11, 2024

I implemented this proposal godotengine/godot-proposals#6558 to create an unlimited number of columns if the variable max_columns is set to 0 and to add a horizontal scrollbar if the size of the node is too small.

This PR doesn't solve #56045 so the items are still selectable at the margin and the text is not cut off at the left and bottom margins. The workaround mentioned in this comment #56045 (comment) still works.

Fixes godotengine/godot-proposals#6558

@havi05 havi05 requested a review from a team as a code owner November 11, 2024 07:12
@havi05 havi05 force-pushed the itemlist-h-scroll-bar branch from dcf001a to 1bb91d4 Compare November 11, 2024 07:39
@havi05 havi05 requested a review from a team as a code owner November 11, 2024 07:39
@AThousandShips AThousandShips changed the title ItemList - Add HScrollbar to ItemList when max_columns=0 Add HScrollbar to ItemList when max_columns == 0 Nov 11, 2024
@AThousandShips AThousandShips added this to the 4.x milestone Nov 11, 2024
@havi05 havi05 force-pushed the itemlist-h-scroll-bar branch from 1bb91d4 to 0b38e86 Compare November 16, 2024 19:19
@havi05 havi05 marked this pull request as draft December 11, 2024 20:43
@havi05 havi05 force-pushed the itemlist-h-scroll-bar branch from 0b38e86 to 0bb197a Compare December 16, 2024 17:14
@havi05
Copy link
Contributor Author

havi05 commented Dec 16, 2024

I have added an wraparound_items boolean, because I noticed that the horizontal scroll bar was breaking some UI's, like the file selection dialog of the Project Manager. (All Items were in a row before the last force-push and did not fill the space.)

The boolean wraparound_items is set to true by default and dosn't change the behavior of the ItemLists (compared to before this pr), so it shouldn't be a breaking change.

If it is set to true, all items will be moved to the next row, if there isn't enough space. (as was the case before this pr.)
If it is set to false, a horizontal scroll bar is added and the maximum scroll value is set to show all columns set in max_column.
(If wraparound_items = false and max_columns = 0 unlimited columns will be generated.)

Please let me know if you have any suggestions for improving the wording of the documentation.

@havi05 havi05 marked this pull request as ready for review December 16, 2024 17:45
@havi05 havi05 force-pushed the itemlist-h-scroll-bar branch 2 times, most recently from fe29850 to 3772659 Compare December 17, 2024 15:44
@havi05 havi05 force-pushed the itemlist-h-scroll-bar branch from 3772659 to 7ff1db9 Compare January 9, 2025 20:48
@akien-mga akien-mga modified the milestones: 4.x, 4.4 Jan 9, 2025
@havi05 havi05 force-pushed the itemlist-h-scroll-bar branch from 7ff1db9 to a9af65d Compare January 10, 2025 13:58
@akien-mga akien-mga merged commit 3ca139e into godotengine:master Jan 10, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add an horizontal scrollbar to ItemList
4 participants