summaryrefslogtreecommitdiff
path: root/scene/gui/tab_container.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/tab_container.cpp')
-rw-r--r--scene/gui/tab_container.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp
index 952f2a9710..0c7a58dc16 100644
--- a/scene/gui/tab_container.cpp
+++ b/scene/gui/tab_container.cpp
@@ -206,9 +206,6 @@ void TabContainer::_notification(int p_what) {
break;
}
- // Draw the tab area.
- panel->draw(canvas, Rect2(0, header_height, size.width, size.height - header_height));
-
// Draw all visible tabs.
int x = 0;
for (int i = 0; i < tab_widths.size(); i++) {
@@ -227,7 +224,7 @@ void TabContainer::_notification(int p_what) {
// Draw the tab background.
int tab_width = tab_widths[i];
- Rect2 tab_rect(tabs_ofs_cache + x, 2, tab_width, header_height);
+ Rect2 tab_rect(tabs_ofs_cache + x, 0, tab_width, header_height);
tab_style->draw(canvas, tab_rect);
// Draw the tab contents.
@@ -282,6 +279,8 @@ void TabContainer::_notification(int p_what) {
Color(1, 1, 1, first_tab_cache > 0 ? 1.0 : 0.5));
}
+ // Draw the tab area.
+ panel->draw(canvas, Rect2(0, header_height, size.width, size.height - header_height));
} break;
case NOTIFICATION_THEME_CHANGED: {
if (get_tab_count() > 0) {
@@ -660,7 +659,7 @@ TabContainer::TabContainer() {
current = 0;
previous = 0;
mouse_x_cache = 0;
- align = ALIGN_LEFT;
+ align = ALIGN_CENTER;
tabs_visible = true;
popup = NULL;
} \ No newline at end of file