Skip to content

Commit

Permalink
Merge pull request #95122 from kleonc/tab_bar_clear_close_button_rect
Browse files Browse the repository at this point in the history
Clear `TabBar` tab close button's rect after it's hidden
  • Loading branch information
akien-mga committed Aug 6, 2024
2 parents 79ae952 + d1740e6 commit c81aa6e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scene/gui/tab_bar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,8 @@ void TabBar::_draw_tab(Ref<StyleBox> &p_tab_style, Color &p_font_color, int p_in
}

cb->draw(ci, Point2i(cb_rect.position.x + style->get_margin(SIDE_LEFT), cb_rect.position.y + style->get_margin(SIDE_TOP)));
} else {
tabs.write[p_index].cb_rect = Rect2();
}
}

Expand Down

0 comments on commit c81aa6e

Please sign in to comment.