Remove the separator from ItemList's thumbnail mode

This commit is contained in:
Jakub Marcowski 2023-10-28 16:42:23 +02:00 committed by Relintai
parent dddc914981
commit f45f3bbc73

View File

@ -1157,13 +1157,16 @@ void ItemList::_notification(int p_what) {
first_visible_separator = lo; first_visible_separator = lo;
} }
for (int i = first_visible_separator; i < separators.size(); i++) { // If not in thumbnails mode, draw visible separators.
if (separators[i] > clip.position.y + clip.size.y) { if (icon_mode != ICON_MODE_TOP) {
break; // done for (int i = first_visible_separator; i < separators.size(); i++) {
} if (separators[i] > clip.position.y + clip.size.y) {
break; // done
}
const int y = base_ofs.y + separators[i]; const int y = base_ofs.y + separators[i];
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);
}
} }
} }
} }