1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-02 16:48:55 +00:00

Merge pull request #12902 from volzhs/fix-itemlist-stylebox

Fit stylebox on ItemList
This commit is contained in:
Andreas Haas
2017-11-13 17:08:23 +01:00
committed by GitHub

View File

@@ -754,7 +754,7 @@ void ItemList::_notification(int p_what) {
int width = size.width - bg->get_minimum_size().width; int width = size.width - bg->get_minimum_size().width;
if (scroll_bar->is_visible()) { if (scroll_bar->is_visible()) {
width -= mw + bg->get_margin(MARGIN_RIGHT); width -= mw;
} }
draw_style_box(bg, Rect2(Point2(), size)); draw_style_box(bg, Rect2(Point2(), size));
@@ -1107,7 +1107,7 @@ void ItemList::_notification(int p_what) {
} }
for (int i = 0; i < separators.size(); i++) { for (int i = 0; i < separators.size(); i++) {
draw_line(Vector2(bg->get_margin(MARGIN_LEFT), base_ofs.y + separators[i]), Vector2(size.width - bg->get_margin(MARGIN_RIGHT), base_ofs.y + separators[i]), guide_color); draw_line(Vector2(bg->get_margin(MARGIN_LEFT), base_ofs.y + separators[i]), Vector2(width, base_ofs.y + separators[i]), guide_color);
} }
} }
} }