diff options
author | Ton Roosendaal <ton@blender.org> | 2011-06-30 19:02:03 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2011-06-30 19:02:03 +0400 |
commit | 06fcf2e6ef7a1483021a43dab3a5c1920a2ef9b4 (patch) | |
tree | 8eee15123f0d833912346add4532e87ba5d016e2 /source/blender/editors/interface | |
parent | f2c7cb0912faada4a38791afa7c801b92586c4ca (diff) |
Todo item:
Closed regions didn't always draw the (+) icon right place, confusing
for users.
Next to that, I think this icon is using a bad metaphor or visual language,
Illustrated best if you close a header in outliner or buttons. Icons are
UI widgets, for screen/editor layouts different controls can be stylized.
My preference is something that aligns visually to the seperators between
regions; for testing and hacking pleasure I've added two quick versions,
a small tabbish thing and a triangle. Enable these with debug menu,
ALT+CTRL+D, values 1 or 2.
This is simply drawn with opengl now. An image for it can be made as well.
Previews:
http://www.blender.org/bf/closed_regions1.png
http://www.blender.org/bf/closed_regions2.png
http://www.blender.org/bf/closed_regions3.png
There's other design ideas to explore as well, like making region deviders
8-10 pixels wide, with a 'drag me' dot on it or so. That takes some screen
estate though, and will require to add big editor-dividers too...
Fun stuff for the mockup-mafia to check on, we have time :)
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_draw.c | 10 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_widgets.c | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index c7f11116834..97299a6a766 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -142,13 +142,13 @@ void uiDrawBox(int mode, float minx, float miny, float maxx, float maxy, float r static void round_box_shade_col(float *col1, float *col2, float fac) { - float col[3]; + float col[4]; col[0]= (fac*col1[0] + (1.0f-fac)*col2[0]); col[1]= (fac*col1[1] + (1.0f-fac)*col2[1]); col[2]= (fac*col1[2] + (1.0f-fac)*col2[2]); - - glColor3fv(col); + col[3]= (fac*col1[3] + (1.0f-fac)*col2[3]); + glColor4fv(col); } @@ -159,7 +159,7 @@ void uiDrawBoxShade(int mode, float minx, float miny, float maxx, float maxy, fl float vec[7][2]= {{0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169}, {0.707, 0.293}, {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}}; float div= maxy-miny; - float coltop[3], coldown[3], color[4]; + float coltop[4], coldown[4], color[4]; int a; /* mult */ @@ -173,9 +173,11 @@ void uiDrawBoxShade(int mode, float minx, float miny, float maxx, float maxy, fl coltop[0]= color[0]+shadetop; if(coltop[0]>1.0f) coltop[0]= 1.0f; coltop[1]= color[1]+shadetop; if(coltop[1]>1.0f) coltop[1]= 1.0f; coltop[2]= color[2]+shadetop; if(coltop[2]>1.0f) coltop[2]= 1.0f; + coltop[3]= color[3]; coldown[0]= color[0]+shadedown; if(coldown[0]<0.0f) coldown[0]= 0.0f; coldown[1]= color[1]+shadedown; if(coldown[1]<0.0f) coldown[1]= 0.0f; coldown[2]= color[2]+shadedown; if(coldown[2]<0.0f) coldown[2]= 0.0f; + coldown[3]= color[3]; glShadeModel(GL_SMOOTH); glBegin(mode); diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index b6e255b6758..25a64994f5c 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -180,7 +180,7 @@ void ui_draw_anti_tria(float x1, float y1, float x2, float y2, float x3, float y glEnable(GL_BLEND); glGetFloatv(GL_CURRENT_COLOR, color); - color[3]= 0.125; + color[3]*= 0.125; glColor4fv(color); /* for each AA step */ |