summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authortoger5 <toger5@hotmail.de>2017-09-02 03:29:04 +0200
committertoger5 <toger5@hotmail.de>2017-09-15 00:50:34 +0200
commit10c400c456e85bfcb988bc8a27657d044306ab10 (patch)
treead2b9f9b7096b3d6e4703c69e8721149a7213eb7 /scene
parent9488f06e4a4bba74db29f5a1d72ff29558cf3e10 (diff)
Added border for tabs + container.
- moved tabConetent position to be more reasonable. - fixed drawing order to allow those kind of styles.
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/tab_container.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp
index 461ae3444b..ff7f712a02 100644
--- a/scene/gui/tab_container.cpp
+++ b/scene/gui/tab_container.cpp
@@ -208,6 +208,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++) {
@@ -280,9 +283,6 @@ void TabContainer::_notification(int p_what) {
Point2(x, y_center - (decrement->get_height() / 2)),
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) {