[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [19266] branches/blender2.5/blender/source /blender/editors/interface: * More UI control tweaks
Matt Ebb
matt at mke3.net
Thu Mar 12 06:56:03 CET 2009
Revision: 19266
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19266
Author: broken
Date: 2009-03-12 06:56:02 +0100 (Thu, 12 Mar 2009)
Log Message:
-----------
* More UI control tweaks
Modified Paths:
--------------
branches/blender2.5/blender/source/blender/editors/interface/interface_draw.c
branches/blender2.5/blender/source/blender/editors/interface/resources.c
Modified: branches/blender2.5/blender/source/blender/editors/interface/interface_draw.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/interface/interface_draw.c 2009-03-12 03:55:53 UTC (rev 19265)
+++ branches/blender2.5/blender/source/blender/editors/interface/interface_draw.c 2009-03-12 05:56:02 UTC (rev 19266)
@@ -897,8 +897,8 @@
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 @@
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_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_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 @@
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 @@
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);
Modified: branches/blender2.5/blender/source/blender/editors/interface/resources.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/interface/resources.c 2009-03-12 03:55:53 UTC (rev 19265)
+++ branches/blender2.5/blender/source/blender/editors/interface/resources.c 2009-03-12 05:56:02 UTC (rev 19266)
@@ -370,7 +370,7 @@
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 @@
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);
More information about the Bf-blender-cvs
mailing list