diff options
author | Matt Ebb <matt@mke3.net> | 2010-08-11 06:31:54 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-08-11 06:31:54 +0400 |
commit | c4f1c0fda13ade79ac8320a59cb77c183340893a (patch) | |
tree | db291485d1e2e4ca4cb12bc7ed85694dd52e3405 /source/blender/editors/interface/interface_draw.c | |
parent | 4ed342567e234aa4d434e7551d2a38630a47f395 (diff) |
Fix silly bug with color ramp ui where there was an extra pixel
of background on the right side
Diffstat (limited to 'source/blender/editors/interface/interface_draw.c')
-rw-r--r-- | source/blender/editors/interface/interface_draw.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index 7179ef96dc0..2a9a1335b1f 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -1146,7 +1146,7 @@ void ui_draw_but_COLORBAND(uiBut *but, uiWidgetColors *wcol, rcti *rect) glColor4fv( &cbd->r ); glVertex2fv(v1); glVertex2fv(v2); - for( a = 1; a < sizex; a++ ) { + for( a = 1; a <= sizex; a++ ) { pos = ((float)a) / (sizex-1); do_colorband( coba, pos, colf ); if (but->block->color_profile != BLI_PR_NONE) @@ -1163,19 +1163,8 @@ void ui_draw_but_COLORBAND(uiBut *but, uiWidgetColors *wcol, rcti *rect) glDisable(GL_BLEND); /* outline */ - v1[0]= x1; v1[1]= y1; - - cpack(0x0); - glBegin(GL_LINE_LOOP); - glVertex2fv(v1); - v1[0]+= sizex; - glVertex2fv(v1); - v1[1]+= sizey; - glVertex2fv(v1); - v1[0]-= sizex; - glVertex2fv(v1); - glEnd(); - + glColor4f(0.0, 0.0, 0.0, 1.0); + fdrawbox(x1, y1, x1+sizex, y1+sizey); /* help lines */ v1[0]= v2[0]=v3[0]= x1; @@ -1231,6 +1220,7 @@ void ui_draw_but_COLORBAND(uiBut *but, uiWidgetColors *wcol, rcti *rect) } } glEnd(); + } void ui_draw_but_NORMAL(uiBut *but, uiWidgetColors *wcol, rcti *rect) |