diff options
| author | Daniel J. Ramirez | 2017-01-22 22:40:43 -0600 |
|---|---|---|
| committer | Rémi Verschelde | 2017-04-27 08:04:57 +0200 |
| commit | f045efe007cffb87238ee519b7f33d710814ded7 (patch) | |
| tree | 9cb7b21ee73cd6a184ef2b18daff6867b98062d8 /scene/gui/tab_container.cpp | |
| parent | 5993a5fac9a108297fc7909d1a38abac471d037d (diff) | |
| download | godot-f045efe007cffb87238ee519b7f33d710814ded7.tar.gz godot-f045efe007cffb87238ee519b7f33d710814ded7.tar.zst godot-f045efe007cffb87238ee519b7f33d710814ded7.zip | |
Diffstat (limited to 'scene/gui/tab_container.cpp')
| -rw-r--r-- | scene/gui/tab_container.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp index 0c7a58dc1..952f2a971 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 |
