Fix to fit stylebox with ItemList

(cherry picked from commit 4c9b00b508)
This commit is contained in:
volzhs 2016-11-01 07:45:37 +09:00 committed by Rémi Verschelde
parent d44e6ea268
commit 7c92b401f1

View file

@ -801,7 +801,10 @@ void ItemList::_notification(int p_what) {
Size2 size = get_size();
float page = size.height-bg->get_minimum_size().height;
int width = size.width - mw - bg->get_minimum_size().width;
int width = size.width-bg->get_minimum_size().width;
if (!scroll_bar->is_hidden()){
width-=mw+bg->get_margin(MARGIN_RIGHT);
}
scroll_bar->set_page(page);
draw_style_box(bg,Rect2(Point2(),size));