diff options
author | Matt Ebb <matt@mke3.net> | 2009-03-12 08:56:02 +0300 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2009-03-12 08:56:02 +0300 |
commit | c3cf187123c97022b5da53de10efab5ae57b8de0 (patch) | |
tree | e81640380e6054ee695729c2935f3a56c5c7c5f2 /source | |
parent | 9d766c35adba37f7c575c30aa3abfd1a1169ceba (diff) |
* More UI control tweaks
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/interface/interface_draw.c | 25 | ||||
-rw-r--r-- | source/blender/editors/interface/resources.c | 6 |
2 files changed, 15 insertions, 16 deletions
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index d9df66aa741..8c090227737 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -897,8 +897,8 @@ static void round_button_shaded(int type, int colorid, float asp, float x1, floa float shadefac; /* emboss */ - UI_ThemeColorShade(TH_BUT_OUTLINE, 50); - uiRoundRectFakeAA(x1, y1-1, x2, y2-1, rad, asp); + glColor4f(1.0f, 1.0f, 1.0f, 0.08f); + uiRoundRectFakeAA(x1+1, y1-1, x2, y2-1, rad, asp); /* colour shading */ if (flag & UI_SELECT) { @@ -929,12 +929,12 @@ static void round_button_flat(int colorid, float asp, float x1, float y1, float int alpha_offs= (flag & UI_BUT_DISABLED)?UI_DISABLED_ALPHA_OFFS:0; /* emboss */ - UI_ThemeColorShade(TH_BUT_OUTLINE, 50); - uiRoundRectFakeAA(x1, y1-1, x2, y2-1, rad, asp); + glColor4f(1.0f, 1.0f, 1.0f, 0.08f); + uiRoundRectFakeAA(x1+1, y1-1, x2, y2-1, rad, asp); /* colour shading */ if(flag & UI_SELECT) { - if (flag & UI_ACTIVE) UI_ThemeColorShade(colorid, -20); + if (flag & UI_ACTIVE) UI_ThemeColorShade(colorid, -30); else UI_ThemeColorShade(colorid, -45); } else { @@ -1197,11 +1197,14 @@ static void ui_roundshaded_button(int type, int colorid, float asp, float x1, fl static void ui_roundshaded_flat(int type, int colorid, float asp, float x1, float y1, float x2, float y2, int flag) { - float rad, maxrad=10.0; + float rad, maxrad; int align= (flag & UI_BUT_ALIGN); int alpha_offs= (flag & UI_BUT_DISABLED)?UI_DISABLED_ALPHA_OFFS:0; /* rounded corners */ + if (type == TEX) maxrad = 5.0; + else maxrad= 10.0; + rad= (y2-y1)/2.0; if (rad>(x2-x1)/2) rad = (x2-x1)/2; if (maxrad) { @@ -1985,7 +1988,6 @@ static void ui_draw_minimal(int type, int colorid, float asp, float x1, float y1 static void ui_draw_slider(int colorid, float fac, float aspect, float x1, float y1, float x2, float y2, int flag) { int alpha_offs= (flag & UI_BUT_DISABLED)?UI_DISABLED_ALPHA_OFFS:0; - float ymid, yc; float maxrad= 10.0; float rad; int origround, round = uiGetRoundBox(); @@ -1993,13 +1995,9 @@ static void ui_draw_slider(int colorid, float fac, float aspect, float x1, float rad= (y2-y1)/2.0; if (rad>(x2-x1)/2) rad = (x2-x1)/2; if (rad > maxrad) rad = maxrad; - - /* the slider background line */ - ymid= (y1+y2)/2.0; - yc= 1.7*aspect; - if(flag & UI_ACTIVE) UI_ThemeColorShade(colorid, -60); - else UI_ThemeColorShade(colorid, -40); + if(flag & UI_ACTIVE) UI_ThemeColorShade(colorid, -75); + else UI_ThemeColorShade(colorid, -45); origround = round; round &= ~(2|4); @@ -2049,6 +2047,7 @@ static void ui_draw_slider(int colorid, float fac, float aspect, float x1, float gl_round_box(GL_POLYGON, x1+fac-1.0, y1+ofsy, x2-1.0, y2-ofsy, end_rad); } + /* trace over outline again, to cover up inaccuracies */ UI_ThemeColorBlendShadeAlpha(TH_BUT_OUTLINE, TH_BACK, 0.1, -30, alpha_offs); uiSetRoundBox(origround); uiRoundRectFakeAA(x1, y1, x2, y2, rad, aspect); diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 6f29d8dbc94..472f0dc261c 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -370,7 +370,7 @@ void ui_theme_init_userdef(void) SETCOL(btheme->tui.setting, 180, 180, 180, 255); SETCOL(btheme->tui.setting1, 180, 180, 180, 255); SETCOL(btheme->tui.setting2, 180, 180, 180, 255); - SETCOL(btheme->tui.num, 143, 143, 143, 255); + SETCOL(btheme->tui.num, 180, 180, 180, 255); SETCOL(btheme->tui.textfield, 143, 142, 143, 255); SETCOL(btheme->tui.textfield_hi,255, 151, 26, 255); SETCOL(btheme->tui.popup, 174, 174, 174, 255); @@ -378,9 +378,9 @@ void ui_theme_init_userdef(void) SETCOL(btheme->tui.text, 0,0,0, 255); SETCOL(btheme->tui.text_hi, 255, 255, 255, 255); - SETCOL(btheme->tui.menu_back, 255, 255, 255, 235); + SETCOL(btheme->tui.menu_back, 220, 220, 220, 235); SETCOL(btheme->tui.menu_item, 255, 255, 255, 20); - SETCOL(btheme->tui.menu_hilite, 0x7F,0x7F,0x7F, 255); + SETCOL(btheme->tui.menu_hilite, 110, 110, 110, 255); SETCOL(btheme->tui.menu_text, 0, 0, 0, 255); SETCOL(btheme->tui.menu_text_hi, 255, 255, 255, 255); |