Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Ebb <matt@mke3.net>2010-04-06 11:02:16 +0400
committerMatt Ebb <matt@mke3.net>2010-04-06 11:02:16 +0400
commit5304a65b50103c405cc5130a479a36833ec7f9bd (patch)
tree9cb6c9928f475a1963bd0fe52a73841db6479ee2 /source/blender/editors/screen/area.c
parentb9d60f20102b4bf621a9bca244f627177af1cd99 (diff)
Fix [#21516] UI artifacts in array modifier
Modify the glClearColor used to draw disabled buttons, when creating a ROUNDBOX ui element. Made a convenience function and rippled it though, too.
Diffstat (limited to 'source/blender/editors/screen/area.c')
-rw-r--r--source/blender/editors/screen/area.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 61aa7a63da9..a248de22e68 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -340,9 +340,7 @@ void ED_region_do_draw(bContext *C, ARegion *ar)
/* optional header info instead? */
if(ar->headerstr) {
- float col[3];
- UI_GetThemeColor3fv(TH_HEADER, col);
- glClearColor(col[0], col[1], col[2], 0.0);
+ UI_ThemeClearColor(TH_HEADER);
glClear(GL_COLOR_BUFFER_BIT);
UI_ThemeColor(TH_TEXT);
@@ -1228,7 +1226,6 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, char *contex
Panel *panel;
View2D *v2d= &ar->v2d;
View2DScrollers *scrollers;
- float col[3];
int xco, yco, x, y, miny=0, w, em, header, triangle, open, newcontext= 0;
if(contextnr >= 0)
@@ -1334,14 +1331,9 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, char *contex
}
/* clear */
- if (ar->type->regionid == RGN_TYPE_PREVIEW)
- UI_GetThemeColor3fv(TH_PREVIEW_BACK, col);
- else
- UI_GetThemeColor3fv(TH_BACK, col);
-
- glClearColor(col[0], col[1], col[2], 0.0);
+ UI_ThemeClearColor((ar->type->regionid == RGN_TYPE_PREVIEW)?TH_PREVIEW_BACK:TH_BACK);
glClear(GL_COLOR_BUFFER_BIT);
-
+
/* before setting the view */
if(vertical) {
/* only allow scrolling in vertical direction */
@@ -1418,16 +1410,10 @@ void ED_region_header(const bContext *C, ARegion *ar)
uiLayout *layout;
HeaderType *ht;
Header header = {0};
- float col[3];
int maxco, xco, yco;
- /* clear */
- if(ED_screen_area_active(C))
- UI_GetThemeColor3fv(TH_HEADER, col);
- else
- UI_GetThemeColor3fv(TH_HEADERDESEL, col);
-
- glClearColor(col[0], col[1], col[2], 0.0);
+ /* clear */
+ UI_ThemeClearColor((ED_screen_area_active(C))?TH_HEADER:TH_HEADERDESEL);
glClear(GL_COLOR_BUFFER_BIT);
/* set view2d view matrix for scrolling (without scrollers) */