[Bf-blender-cvs] [2524b2b] UI-graphical-redesign: Adjust some theme colors
Julian Eisel
noreply at git.blender.org
Wed Jun 3 17:03:56 CEST 2015
Commit: 2524b2b5b912f36c3f1928d71ebaee8de10a0881
Author: Julian Eisel
Date: Wed Jun 3 16:43:32 2015 +0200
Branches: UI-graphical-redesign
https://developer.blender.org/rB2524b2b5b912f36c3f1928d71ebaee8de10a0881
Adjust some theme colors
And the usual minor cleanup
===================================================================
M source/blender/blenloader/intern/versioning_defaults.c
M source/blender/editors/interface/interface_widgets.c
M source/blender/editors/interface/resources.c
===================================================================
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index c2e72bd..665322b 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -67,10 +67,7 @@ void BLO_update_defaults_userpref_blend(void)
for (style = U.uistyles.first; style; style = style->next) {
style->paneltitle.points = style->widgetlabel.points = style->widget.points = 10;
- style->paneltitle.shadx = 1;
- style->paneltitle.shady = -1;
- style->paneltitle.shadowalpha = 0.1f;
- style->paneltitle.shadowcolor = 0.0f;
+ style->paneltitle.shadow = style->widgetlabel.shadow = 0;
}
}
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 0107afe..dababfe 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -1659,7 +1659,7 @@ static struct uiWidgetColors wcol_numslider = {
{25, 25, 25, 255},
{180, 180, 180, 255},
{153, 153, 153, 255},
- {128, 128, 128, 255},
+ {140, 140, 140, 255},
{0, 0, 0, 255},
{255, 255, 255, 255},
@@ -1823,7 +1823,7 @@ static struct uiWidgetColors wcol_radio = {
};
static struct uiWidgetColors wcol_regular = {
- {25, 25, 25, 255},
+ {40, 40, 40, 255},
{153, 153, 153, 255},
{100, 100, 100, 255},
{25, 25, 25, 255},
@@ -1855,9 +1855,9 @@ static struct uiWidgetColors wcol_tool = {
};
static struct uiWidgetColors wcol_box = {
- {25, 25, 25, 255},
- {128, 128, 128, 255},
- {100, 100, 100, 255},
+ {50, 50, 50, 255},
+ {140, 140, 140, 255},
+ {130, 130, 130, 255},
{25, 25, 25, 255},
{0, 0, 0, 255},
@@ -1871,7 +1871,7 @@ static struct uiWidgetColors wcol_box = {
};
static struct uiWidgetColors wcol_toggle = {
- {25, 25, 25, 255},
+ {70, 70, 70, 255},
{153, 153, 153, 255},
{100, 100, 100, 255},
{25, 25, 25, 255},
@@ -1890,7 +1890,7 @@ static struct uiWidgetColors wcol_scroll = {
{50, 50, 50, 180},
{80, 80, 80, 180},
{100, 100, 100, 180},
- {128, 128, 128, 255},
+ {140, 140, 140, 255},
{0, 0, 0, 255},
{255, 255, 255, 255},
@@ -3371,6 +3371,7 @@ static void widget_box(uiBut *but, uiWidgetColors *wcol, rcti *rect, int UNUSED(
rad = wcol->roundness * U.widget_unit;
round_box_edges(&wtb, roundboxalign, rect, rad);
+ wtb.draw_outline = true;
widgetbase_draw(&wtb, wcol);
copy_v3_v3_char(wcol->inner, old_col);
@@ -3380,13 +3381,27 @@ static void widget_but(uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int
{
uiWidgetBase wtb;
float rad;
-
+
widget_init(&wtb);
-
+
/* half rounded */
rad = wcol->roundness * U.widget_unit;
round_box_edges(&wtb, roundboxalign, rect, rad);
-
+
+ widgetbase_draw(&wtb, wcol);
+}
+
+static void widget_toggle(uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int roundboxalign)
+{
+ uiWidgetBase wtb;
+ float rad;
+
+ widget_init(&wtb);
+
+ /* half rounded */
+ rad = wcol->roundness * U.widget_unit;
+ round_box_edges(&wtb, roundboxalign, rect, rad);
+
wtb.draw_outline = true;
widgetbase_draw(&wtb, wcol);
}
@@ -3458,6 +3473,7 @@ static uiWidgetType *widget_type(uiWidgetTypeEnum type)
case UI_WTYPE_TOGGLE:
wt.wcol_theme = &btheme->tui.wcol_toggle;
+ wt.draw = widget_toggle;
break;
case UI_WTYPE_CHECKBOX:
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index 9ce006e..fead706 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -867,24 +867,6 @@ void ui_theme_init_default(void)
rgba_char_args_set_fl(btheme->tui.widget_emboss, 1.0f, 1.0f, 1.0f, 0.02f);
- btheme->tui.wcol_box.roundness = 0.2f;
- btheme->tui.wcol_list_item.roundness = 0.2f;
- btheme->tui.wcol_menu.roundness = 0.2f;
- btheme->tui.wcol_menu_back.roundness = 0.25f;
- btheme->tui.wcol_menu_item.roundness = 0.2f;
- btheme->tui.wcol_num.roundness = 0.5f;
- btheme->tui.wcol_numslider.roundness = 0.5f;
- btheme->tui.wcol_option.roundness = 0.35f;
- btheme->tui.wcol_progress.roundness = 0.2f;
- btheme->tui.wcol_pulldown.roundness = 0.2f;
- btheme->tui.wcol_radio.roundness = 0.2f;
- btheme->tui.wcol_regular.roundness = 0.2f;
- btheme->tui.wcol_scroll.roundness = 0.5f;
- btheme->tui.wcol_text.roundness = 0.2f;
- btheme->tui.wcol_toggle.roundness = 0.2f;
- btheme->tui.wcol_tool.roundness = 0.25f;
- btheme->tui.wcol_tooltip.roundness = 0.2f;
-
rgba_char_args_set(btheme->tui.xaxis, 220, 0, 0, 255);
rgba_char_args_set(btheme->tui.yaxis, 0, 220, 0, 255);
rgba_char_args_set(btheme->tui.zaxis, 0, 0, 220, 255);
@@ -2657,7 +2639,7 @@ void init_userdef_do_versions(void)
rgba_char_args_set(ts->panelcolors.header, 97, 97, 97, 255);
}
- rgba_char_args_set_fl(btheme->tui.area_edges, 0.15, 0.15f, 0.15f, 1.0f);
+ rgba_char_args_set_fl(btheme->tui.area_edges, 0.23f, 0.23f, 0.23f, 1.0f);
btheme->tui.widget_emboss[3] = 0;
ui_widget_color_init(&btheme->tui);
More information about the Bf-blender-cvs
mailing list