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:
authorLukas Toenne <lukas.toenne@googlemail.com>2012-06-01 18:42:21 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2012-06-01 18:42:21 +0400
commit32fe2d71fc74b3931dc189590e8b1e4636f1af73 (patch)
treeac12286e9ff646672e6774eca652a509e63ba249 /source/blender/editors/interface
parent1e17f0b1b2d1b143118fd29672582797597c3965 (diff)
Theme color for frame nodes. The alpha value from this theme color is also used when drawing frames with a custom color (which is just RGB).
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/interface_draw.c9
-rw-r--r--source/blender/editors/interface/interface_intern.h2
-rw-r--r--source/blender/editors/interface/resources.c2
3 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index e535990e7e9..a0b418c1a9a 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -1663,12 +1663,12 @@ void uiDrawBoxShadow(unsigned char alpha, float minx, float miny, float maxx, fl
}
-void ui_dropshadow(rctf *rct, float radius, float aspect, int UNUSED(select))
+void ui_dropshadow(rctf *rct, float radius, float aspect, float alpha, int UNUSED(select))
{
int i;
float rad;
float a;
- char alpha = 2;
+ float dalpha = alpha * 2.0f/255.0f, calpha;
glEnable(GL_BLEND);
@@ -1688,10 +1688,11 @@ void ui_dropshadow(rctf *rct, float radius, float aspect, int UNUSED(select))
a = i * aspect;
}
+ calpha = dalpha;
for (; i--; a -= aspect) {
/* alpha ranges from 2 to 20 or so */
- glColor4ub(0, 0, 0, alpha);
- alpha += 2;
+ glColor4f(0.0f, 0.0f, 0.0f, calpha);
+ calpha += dalpha;
uiDrawBox(GL_POLYGON, rct->xmin - a, rct->ymin - a, rct->xmax + a, rct->ymax - 10.0f + a, rad + a);
}
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h
index 5d12bdf71da..9af3ff3bdd8 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -445,7 +445,7 @@ extern int ui_handler_panel_region(struct bContext *C, struct wmEvent *event);
extern void ui_draw_aligned_panel(struct uiStyle *style, uiBlock *block, rcti *rect);
/* interface_draw.c */
-extern void ui_dropshadow(rctf *rct, float radius, float aspect, int select);
+extern void ui_dropshadow(rctf *rct, float radius, float aspect, float alpha, int select);
void ui_draw_gradient(rcti *rect, const float hsv[3], int type, float alpha);
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index f4fa88caba0..5aec4b3c211 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -363,6 +363,8 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo
cp = ts->syntaxv; break;
case TH_NODE_GROUP:
cp = ts->syntaxc; break;
+ case TH_NODE_FRAME:
+ cp = ts->movie; break;
case TH_NODE_CURVING:
cp = &ts->noodle_curving; break;