From e322fd140ec6865764c313a9a4489d6db68ab7fb Mon Sep 17 00:00:00 2001 From: Michael Alexsander Silva Dias Date: Sun, 10 Feb 2019 18:11:54 -0200 Subject: [PATCH] Add disabled tab style --- editor/editor_themes.cpp | 6 ++++++ scene/resources/default_theme/default_theme.cpp | 2 ++ scene/resources/default_theme/tab_disabled.png | Bin 0 -> 1233 bytes scene/resources/default_theme/theme_data.h | 6 +++++- 4 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 scene/resources/default_theme/tab_disabled.png diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 31655fed877..ffbb4339dff 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -481,6 +481,10 @@ Ref create_editor_theme(const Ref p_theme) { style_tab_unselected->set_bg_color(dark_color_1); style_tab_unselected->set_border_color_all(dark_color_2); + Ref style_tab_disabled = style_tab_selected->duplicate(); + style_tab_disabled->set_bg_color(color_disabled_bg); + style_tab_disabled->set_border_color_all(color_disabled); + // Editor background theme->set_stylebox("Background", "EditorStyles", make_flat_stylebox(background_color, default_margin_size, default_margin_size, default_margin_size, default_margin_size)); @@ -742,8 +746,10 @@ Ref create_editor_theme(const Ref p_theme) { // Tabs & TabContainer theme->set_stylebox("tab_fg", "TabContainer", style_tab_selected); theme->set_stylebox("tab_bg", "TabContainer", style_tab_unselected); + theme->set_stylebox("tab_disabled", "TabContainer", style_tab_disabled); theme->set_stylebox("tab_fg", "Tabs", style_tab_selected); theme->set_stylebox("tab_bg", "Tabs", style_tab_unselected); + theme->set_stylebox("tab_disabled", "Tabs", style_tab_disabled); theme->set_color("font_color_fg", "TabContainer", font_color); theme->set_color("font_color_bg", "TabContainer", font_color_disabled); theme->set_color("font_color_fg", "Tabs", font_color); diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index 7ed51a2f8f5..c7a815d8a42 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -682,6 +682,7 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const theme->set_stylebox("tab_fg", "TabContainer", sb_expand(make_stylebox(tab_current_png, 4, 4, 4, 1, 16, 4, 16, 4), 2, 2, 2, 2)); theme->set_stylebox("tab_bg", "TabContainer", sb_expand(make_stylebox(tab_behind_png, 5, 5, 5, 1, 16, 6, 16, 4), 3, 0, 3, 3)); + theme->set_stylebox("tab_disabled", "TabContainer", sb_expand(make_stylebox(tab_disabled_png, 5, 5, 5, 1, 16, 6, 16, 4), 3, 0, 3, 3)); theme->set_stylebox("panel", "TabContainer", tc_sb); theme->set_icon("increment", "TabContainer", make_icon(scroll_button_right_png)); @@ -707,6 +708,7 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const theme->set_stylebox("tab_fg", "Tabs", sb_expand(make_stylebox(tab_current_png, 4, 3, 4, 1, 16, 3, 16, 2), 2, 2, 2, 2)); theme->set_stylebox("tab_bg", "Tabs", sb_expand(make_stylebox(tab_behind_png, 5, 4, 5, 1, 16, 5, 16, 2), 3, 3, 3, 3)); + theme->set_stylebox("tab_disabled", "Tabs", sb_expand(make_stylebox(tab_disabled_png, 5, 5, 5, 1, 16, 6, 16, 4), 3, 0, 3, 3)); theme->set_stylebox("panel", "Tabs", tc_sb); theme->set_stylebox("button_pressed", "Tabs", make_stylebox(button_pressed_png, 4, 4, 4, 4)); theme->set_stylebox("button", "Tabs", make_stylebox(button_normal_png, 4, 4, 4, 4)); diff --git a/scene/resources/default_theme/tab_disabled.png b/scene/resources/default_theme/tab_disabled.png new file mode 100644 index 0000000000000000000000000000000000000000..97157a58dd3440df601b4dc9ac9e451c26b8616b GIT binary patch literal 1233 zcmV;?1TOoDP) zaB^>EX>4U6ba`-PAZ2)IW&i+q+Rc_(lH)26MgLhvFM-S?8J2?>B6!-}UKe(6T*b|CgAo$c za=P?w_0Ndwc|dS0zFo&nC@W7~iRef?4;eF$_Uac`BH>e<*0o7%Ty__avwmDw+LiqF z+69HzBb&$1#gQfh5T?+Iij?k$|>CokfHmduNX3jd@4w#ygu=T&}G!)~^o! z#-kM{y@|^)4c}7RXTG|T%Q3~BcfHrxdpkW{b{AklH-fSS3m%vhAbiOYoIMxo9Dc&d>IJ_XbS zVLr6boHxz+3PsFZ2|byRj42IfEn zA0zl=C}(lJfdHv;CDXx1!~;&`F*n8pntfUM6voy95Go$8N*pf`U^%B)Kfy(;p{%0L zsH)eXQIlpb-g))j2S4_x93;4)!G{oHNFhgwE^72K#28b|iIZRp)8tbyDW;Ti#-tgk zGe&3h$a&*UHn-{Kx3I-6ZMk6i6j!wP5=tzo7Tm{QG_XVl_*cxu?!YJ**5MTCxt zo=WMO_EC~&4AkN-&;3#h`86;d9^nJD@|TpKig7n$K1dBh%&sK2r%L!x(msv9+QSmF z`KLs9K_Y_@tQf}^<2TJPx)$&vB}f` z0007FOGiWi|A&vvzW@LL32;bRa{vG?BLDy{BLR4&KXw2B00(qQO+^Re0tyo;AzwD) z6aWAKuSrBfR4C7VkwFT=KoA6Ll3_QnhwM2%#y|L)Ji*ua0}npNt3*&RCT2V=1_Rmj zX`ri{h7lBpr@~QEkTmh(&5NG5;s``)0va41_`f$u