Merge pull request #74632 from davthedev/tabs-hover

Add theming support for hovered tabs
This commit is contained in:
Rémi Verschelde 2023-04-24 16:42:38 +02:00
commit dfee04ae2a
No known key found for this signature in database
GPG key ID: C3336907360768E1
8 changed files with 44 additions and 1 deletions

View file

@ -150,6 +150,7 @@ void TabContainer::_update_theme_item_cache() {
theme_cache.outline_size = get_theme_constant(SNAME("outline_size"));
theme_cache.tab_unselected_style = get_theme_stylebox(SNAME("tab_unselected"));
theme_cache.tab_hovered_style = get_theme_stylebox(SNAME("tab_hovered"));
theme_cache.tab_selected_style = get_theme_stylebox(SNAME("tab_selected"));
theme_cache.tab_disabled_style = get_theme_stylebox(SNAME("tab_disabled"));
@ -227,6 +228,7 @@ void TabContainer::_on_theme_changed() {
}
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);
tab_bar->add_theme_style_override(SNAME("tab_disabled"), theme_cache.tab_disabled_style);