diff options
author | Ton Roosendaal <ton@blender.org> | 2013-04-19 19:02:37 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2013-04-19 19:02:37 +0400 |
commit | ed8b199ac50487d7045ecb73c80a7f40726c072b (patch) | |
tree | 013d441df70c074b13b7f0e39cdf55427b43c064 /source | |
parent | 1c502d83167b24eb0b9e55b4254463fc6331e5ed (diff) |
UI drawing fix:
Wrongly replaced a "&" with "|" for a define. That made node headers in node editor
draw too dark. Also made header for default node not use alpha.
In general this drawing is not very good - it gets too transparent and dark.
Needs nicer AA function in interface, will be done later.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/interface/interface_draw.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_draw.c | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index 86d3fcc1ebf..cd2a2161315 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -390,7 +390,7 @@ void uiRoundRect(float minx, float miny, float maxx, float maxy, float rad) /* (old, used in outliner) plain antialiased filled box */ void uiRoundBox(float minx, float miny, float maxx, float maxy, float rad) { - ui_draw_anti_roundbox(GL_POLYGON, minx, miny, maxx, maxy, rad, roundboxtype | UI_RB_ALPHA); + ui_draw_anti_roundbox(GL_POLYGON, minx, miny, maxx, maxy, rad, roundboxtype & UI_RB_ALPHA); } /* ************** SPECIAL BUTTON DRAWING FUNCTIONS ************* */ diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index 1f19374be17..aaf37a1e9ef 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -775,9 +775,12 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN /* shadow */ node_draw_shadow(snode, node, BASIS_RAD, 1.0f); - /* header */ - if (color_id == TH_NODE) - UI_ThemeColorShade(color_id, -20); + /* header uses color from backdrop, but we make it opaqie */ + if (color_id == TH_NODE) { + float col[3]; + UI_GetThemeColorShade3fv(color_id, -20, col); + glColor4f(col[0], col[1], col[2], 1.0f); + } else UI_ThemeColor(color_id); |