Merge pull request #20150 from ibrahn/fix-scrollbar-atlas

fix scrollbar icons with atlas texture.
This commit is contained in:
Max Hilbrunner 2018-07-17 12:15:22 +02:00 committed by GitHub
commit adec9c3168
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -257,9 +257,7 @@ void ScrollBar::_notification(int p_what) {
Point2 ofs;
VisualServer *vs = VisualServer::get_singleton();
vs->canvas_item_add_texture_rect(ci, Rect2(Point2(), decr->get_size()), decr->get_rid());
decr->draw(ci, Point2());
if (orientation == HORIZONTAL)
ofs.x += decr->get_width();
@ -280,7 +278,7 @@ void ScrollBar::_notification(int p_what) {
else
ofs.height += area.height;
vs->canvas_item_add_texture_rect(ci, Rect2(ofs, decr->get_size()), incr->get_rid());
incr->draw(ci, ofs);
Rect2 grabber_rect;
if (orientation == HORIZONTAL) {