2
0
Fork 0

Merge pull request #84115 from Chubercik/item_list_separator_fix

[3.x] Remove the separator from `ItemList`'s thumbnails mode
3.x
Rémi Verschelde 2023-11-14 11:37:33 +07:00
commit 010f53a0b6
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 9 additions and 6 deletions

@ -1155,6 +1155,8 @@ void ItemList::_notification(int p_what) {
first_visible_separator = lo; first_visible_separator = lo;
} }
// If not in thumbnails mode, draw visible separators.
if (icon_mode != ICON_MODE_TOP) {
for (int i = first_visible_separator; i < separators.size(); i++) { for (int i = first_visible_separator; i < separators.size(); i++) {
if (separators[i] > clip.position.y + clip.size.y) { if (separators[i] > clip.position.y + clip.size.y) {
break; // done break; // done
@ -1164,6 +1166,7 @@ void ItemList::_notification(int p_what) {
draw_line(Vector2(bg->get_margin(MARGIN_LEFT), y), Vector2(width, y), guide_color); draw_line(Vector2(bg->get_margin(MARGIN_LEFT), y), Vector2(width, y), guide_color);
} }
} }
}
} }
void ItemList::_scroll_changed(double) { void ItemList::_scroll_changed(double) {