diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/include/UI_resources.h | 2 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_widgets.c | 5 | ||||
-rw-r--r-- | source/blender/editors/interface/resources.c | 10 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 6 |
5 files changed, 12 insertions, 13 deletions
diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index 8e37e871501..c3d6dd5da38 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -266,7 +266,7 @@ enum { TH_NLA_SOUND, TH_NLA_SOUND_SEL, - TH_EMBOSS, + TH_WIDGET_EMBOSS, TH_AXIS_X, /* X/Y/Z Axis */ TH_AXIS_Y, diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index d6c51b6b220..645637d5130 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -761,10 +761,9 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol) glDrawArrays(GL_QUAD_STRIP, 0, wtb->totvert * 2 + 2); /* emboss bottom shadow */ - UI_GetThemeColor4ubv(TH_EMBOSS, emboss); - if (wtb->emboss) { - UI_GetThemeColor4ubv(TH_EMBOSS, emboss); + UI_GetThemeColor4ubv(TH_WIDGET_EMBOSS, emboss); + if (emboss[3]) { glColor4ubv(emboss); glVertexPointer(2, GL_FLOAT, 0, quad_strip_emboss); diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 945b2f4e925..a0af914e0bc 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -620,8 +620,8 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo cp = ts->nla_sound_sel; break; - case TH_EMBOSS: - cp = btheme->tui.emboss; break; + case TH_WIDGET_EMBOSS: + cp = btheme->tui.widget_emboss; break; case TH_AXIS_X: cp = btheme->tui.xaxis; break; @@ -821,7 +821,7 @@ void ui_theme_init_default(void) rgba_char_args_set(btheme->tui.wcol_tooltip.text, 255, 255, 255, 255); - rgba_char_args_set_fl(btheme->tui.emboss, 1.0f, 1.0f, 1.0f, 0.02f); + rgba_char_args_set_fl(btheme->tui.widget_emboss, 1.0f, 1.0f, 1.0f, 0.02f); rgba_char_args_set(btheme->tui.xaxis, 220, 0, 0, 255); rgba_char_args_set(btheme->tui.yaxis, 0, 220, 0, 255); @@ -2499,10 +2499,10 @@ void init_userdef_do_versions(void) } } - if (U.versionfile < 272 || (U.versionfile == 272 && U.subversionfile < 2)) { + if (U.versionfile < 272 || (U.versionfile == 272 && U.subversionfile < 3)) { bTheme *btheme; for (btheme = U.themes.first; btheme; btheme = btheme->next) { - rgba_char_args_set_fl(btheme->tui.emboss, 1.0f, 1.0f, 1.0f, 0.02f); + rgba_char_args_set_fl(btheme->tui.widget_emboss, 1.0f, 1.0f, 1.0f, 0.02f); } } diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index d8653e1f5fe..73902e9c090 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -168,7 +168,7 @@ typedef struct ThemeUI { uiPanelColors panel; /* depricated, but we keep it for do_versions (2.66.1) */ - char emboss[4]; + char widget_emboss[4]; /* fac: 0 - 1 for blend factor, width in pixels */ float menu_shadow_fac; diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index eac1ea9f46a..6519781dfd0 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -1043,10 +1043,10 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Icon Alpha", "Transparency of icons in the interface, to reduce contrast"); RNA_def_property_update(prop, 0, "rna_userdef_update"); - prop = RNA_def_property(srna, "emboss", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_float_sdna(prop, NULL, "emboss"); + prop = RNA_def_property(srna, "widget_emboss", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_float_sdna(prop, NULL, "widget_emboss"); RNA_def_property_array(prop, 4); - RNA_def_property_ui_text(prop, "Emboss", ""); + RNA_def_property_ui_text(prop, "Widget Emboss", "Color of the 1px shadow line underlying widgets"); RNA_def_property_update(prop, 0, "rna_userdef_update"); /* axis */ |