diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2022-08-30 18:53:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-30 18:53:54 +0200 |
commit | e27b61d291ae65cd1171bd32c9b00912dc17c428 (patch) | |
tree | 8b2f4f2f2810f3617419a828d47408b0f73f6514 /scene | |
parent | 706d988baae40da49c942cf4e7180368fc9b1ead (diff) | |
parent | 8b196be85568b95e532d02cb56e68c790dc69f87 (diff) |
Merge pull request #65042 from YuriSizov/editor-docks-tabbar-bg
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/tab_container.cpp | 4 | ||||
-rw-r--r-- | scene/resources/default_theme/default_theme.cpp | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp index 861a3050cb..3e04ebee6a 100644 --- a/scene/gui/tab_container.cpp +++ b/scene/gui/tab_container.cpp @@ -163,6 +163,10 @@ void TabContainer::_notification(int p_what) { int header_height = _get_top_margin(); + // Draw background for the tabbar. + Ref<StyleBox> tabbar_background = get_theme_stylebox(SNAME("tabbar_background")); + tabbar_background->draw(canvas, Rect2(0, 0, size.width, header_height)); + // Draw the background for the tab's content. panel->draw(canvas, Rect2(0, header_height, size.width, size.height - header_height)); // Draw the popup menu. diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index 410f35e597..73ad1ceff7 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -831,6 +831,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const theme->set_stylebox("tab_unselected", "TabContainer", style_tab_unselected); theme->set_stylebox("tab_disabled", "TabContainer", style_tab_disabled); theme->set_stylebox("panel", "TabContainer", make_flat_stylebox(style_normal_color, 0, 0, 0, 0)); + theme->set_stylebox("tabbar_background", "TabContainer", make_empty_stylebox(0, 0, 0, 0)); theme->set_icon("increment", "TabContainer", icons["scroll_button_right"]); theme->set_icon("increment_highlight", "TabContainer", icons["scroll_button_right_hl"]); |