diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2023-10-20 15:12:11 +0200 |
|---|---|---|
| committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-10-20 15:12:11 +0200 |
| commit | 68a183a2d91709537fe5cab3ed989f97a590845c (patch) | |
| tree | feb3978a5c4444a01bc5b3d5f72b8eda2c140cf6 /scene/gui/tab_container.cpp | |
| parent | 55fc347efd50d297de3b92a5bfc141e52e57c90f (diff) | |
| parent | 215e036600809fd588ec67b8d39efe12ae1ff4c5 (diff) | |
| download | redot-engine-68a183a2d91709537fe5cab3ed989f97a590845c.tar.gz | |
Merge pull request #83626 from YuriSizov/control-less-is-more-as-in-less-excessive-notifications-is-more-performance
Add bulk change guards to successive theme overrides in Editor and GUI
Diffstat (limited to 'scene/gui/tab_container.cpp')
| -rw-r--r-- | scene/gui/tab_container.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp index b757b516d1..481f8f4131 100644 --- a/scene/gui/tab_container.cpp +++ b/scene/gui/tab_container.cpp @@ -191,6 +191,8 @@ void TabContainer::_on_theme_changed() { return; } + tab_bar->begin_bulk_theme_override(); + tab_bar->add_theme_style_override(SNAME("tab_unselected"), theme_cache.tab_unselected_style); tab_bar->add_theme_style_override(SNAME("tab_hovered"), theme_cache.tab_hovered_style); tab_bar->add_theme_style_override(SNAME("tab_selected"), theme_cache.tab_selected_style); @@ -217,6 +219,8 @@ void TabContainer::_on_theme_changed() { tab_bar->add_theme_constant_override(SNAME("icon_max_width"), theme_cache.icon_max_width); tab_bar->add_theme_constant_override(SNAME("outline_size"), theme_cache.outline_size); + tab_bar->end_bulk_theme_override(); + _update_margins(); if (get_tab_count() > 0) { _repaint(); |
