Fix 3D View panel header color wrong after theme reset

Caused by wrong alpha value in rB34b30f847429ac (used 0.01, should've been 0.1). Also made sure all editors initialize same default theme values for panels and cleaned up code a bit.
Works fine with old userpref.blend files.
This commit is contained in:
Julian Eisel 2016-05-03 18:26:58 +02:00
parent 645047708d
commit 9d3d9ac0b9
1 changed files with 7 additions and 11 deletions

View File

@ -786,9 +786,14 @@ static void ui_theme_init_new_do(ThemeSpace *ts)
rgba_char_args_set(ts->panel_text_hi, 255, 255, 255, 255);
#endif
ts->panelcolors.show_back = false;
ts->panelcolors.show_header = false;
rgba_char_args_set(ts->panelcolors.back, 114, 114, 114, 128);
rgba_char_args_set(ts->panelcolors.header, 0, 0, 0, 25);
rgba_char_args_set(ts->button, 145, 145, 145, 245);
rgba_char_args_set(ts->button_title, 0, 0, 0, 255);
rgba_char_args_set(ts->button_text, 0, 0, 0, 255);
rgba_char_args_set(ts->button_text, 0, 0, 0, 255);
rgba_char_args_set(ts->button_text_hi, 255, 255, 255, 255);
rgba_char_args_set(ts->list, 165, 165, 165, 255);
@ -848,14 +853,9 @@ void ui_theme_init_default(void)
/* UI buttons */
ui_widget_color_init(&btheme->tui);
btheme->tui.iconfile[0] = 0;
btheme->tui.panel.show_back = false;
btheme->tui.panel.show_header = false;
rgba_char_args_set(btheme->tui.panel.header, 0, 0, 0, 25);
rgba_char_args_set(btheme->tui.wcol_tooltip.text, 255, 255, 255, 255);
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);
@ -872,10 +872,6 @@ void ui_theme_init_default(void)
ui_theme_init_new(btheme);
/* space view3d */
btheme->tv3d.panelcolors.show_back = false;
btheme->tv3d.panelcolors.show_header = false;
rgba_char_args_set_fl(btheme->tv3d.panelcolors.back, 0.45, 0.45, 0.45, 0.5);
rgba_char_args_set_fl(btheme->tv3d.panelcolors.header, 0, 0, 0, 0.01);
rgba_char_args_set_fl(btheme->tv3d.back, 0.225, 0.225, 0.225, 1.0);
rgba_char_args_set(btheme->tv3d.text, 0, 0, 0, 255);
rgba_char_args_set(btheme->tv3d.text_hi, 255, 255, 255, 255);