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, 5 insertions, 4 deletions
diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp
index 0c7a58dc16..952f2a9710 100644
--- a/scene/gui/tab_container.cpp
+++ b/scene/gui/tab_container.cpp
@@ -206,6 +206,9 @@ 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++) {
@@ -224,7 +227,7 @@ void TabContainer::_notification(int p_what) {
// Draw the tab background.
int tab_width = tab_widths[i];
- Rect2 tab_rect(tabs_ofs_cache + x, 0, tab_width, header_height);
+ Rect2 tab_rect(tabs_ofs_cache + x, 2, tab_width, header_height);
tab_style->draw(canvas, tab_rect);
// Draw the tab contents.
@@ -279,8 +282,6 @@ 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) {
@@ -659,7 +660,7 @@ TabContainer::TabContainer() {
current = 0;
previous = 0;
mouse_x_cache = 0;
- align = ALIGN_CENTER;
+ align = ALIGN_LEFT;
tabs_visible = true;
popup = NULL;
} \ No newline at end of file