diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-09-11 10:41:09 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-09-11 10:41:09 +0400 |
commit | 5fdbfbaf3af05b78ed5b7376c63f310134c24b58 (patch) | |
tree | 2977d2042493620e3e19aba419d3aae656f1bdd0 /source/blender/editors/space_node | |
parent | 5184476fe1bd6c61a50a047bdba1f4b9756f323c (diff) |
replace magic numbers for flags for uiSetRoundBox();
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 10 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_draw.c | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 897de290752..9ea1e8ee877 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -741,23 +741,23 @@ static void node_draw_group(const bContext *C, ARegion *ar, SpaceNode *snode, bN /* backdrop header */ glEnable(GL_BLEND); - uiSetRoundBox(3); + uiSetRoundBox(UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT); UI_ThemeColorShadeAlpha(TH_NODE_GROUP, 0, -70); uiDrawBox(GL_POLYGON, rect.xmin-node_group_frame, rect.ymax, rect.xmax+node_group_frame, rect.ymax+group_header, BASIS_RAD); /* backdrop body */ UI_ThemeColorShadeAlpha(TH_BACK, -8, -70); - uiSetRoundBox(0); + uiSetRoundBox(UI_CNR_NONE); uiDrawBox(GL_POLYGON, rect.xmin, rect.ymin, rect.xmax, rect.ymax, BASIS_RAD); /* input column */ UI_ThemeColorShadeAlpha(TH_BACK, 10, -50); - uiSetRoundBox(8); + uiSetRoundBox(UI_CNR_BOTTOM_LEFT); uiDrawBox(GL_POLYGON, rect.xmin-node_group_frame, rect.ymin, rect.xmin, rect.ymax, BASIS_RAD); /* output column */ UI_ThemeColorShadeAlpha(TH_BACK, 10, -50); - uiSetRoundBox(4); + uiSetRoundBox(UI_CNR_BOTTOM_RIGHT); uiDrawBox(GL_POLYGON, rect.xmax, rect.ymin, rect.xmax+node_group_frame, rect.ymax, BASIS_RAD); /* input column separator */ @@ -775,7 +775,7 @@ static void node_draw_group(const bContext *C, ARegion *ar, SpaceNode *snode, bN glEnd(); /* group node outline */ - uiSetRoundBox(15); + uiSetRoundBox(UI_CNR_ALL); glColor4ub(200, 200, 200, 140); glEnable( GL_LINE_SMOOTH ); uiDrawBox(GL_LINE_LOOP, rect.xmin-node_group_frame, rect.ymin, rect.xmax+node_group_frame, rect.ymax+group_header, BASIS_RAD); diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index ba1e8d3dd59..c1b114d5436 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -568,7 +568,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN return; } - uiSetRoundBox(15-4); + uiSetRoundBox(UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT | UI_CNR_BOTTOM_LEFT); ui_dropshadow(rct, BASIS_RAD, snode->aspect, node->flag & SELECT); /* header */ @@ -580,7 +580,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN if(node->flag & NODE_MUTED) UI_ThemeColorBlend(color_id, TH_REDALERT, 0.5f); - uiSetRoundBox(3); + uiSetRoundBox(UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT); uiRoundBox(rct->xmin, rct->ymax-NODE_DY, rct->xmax, rct->ymax, BASIS_RAD); /* show/hide icons, note this sequence is copied in do_header_node() node_state.c */ @@ -648,7 +648,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN /* body */ UI_ThemeColor4(TH_NODE); glEnable(GL_BLEND); - uiSetRoundBox(8); + uiSetRoundBox(UI_CNR_BOTTOM_LEFT); uiRoundBox(rct->xmin, rct->ymin, rct->xmax, rct->ymax-NODE_DY, BASIS_RAD); glDisable(GL_BLEND); @@ -664,7 +664,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN UI_ThemeColorShadeAlpha(TH_TEXT_HI, 0, -40); else UI_ThemeColorShadeAlpha(TH_TEXT_HI, -20, -120); - uiSetRoundBox(15-4); // round all corners except lower right + uiSetRoundBox(UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT | UI_CNR_BOTTOM_LEFT); // round all corners except lower right uiDrawBox(GL_LINE_LOOP, rct->xmin, rct->ymin, rct->xmax, rct->ymax, BASIS_RAD); glDisable( GL_LINE_SMOOTH ); @@ -745,7 +745,7 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b char showname[128]; /* 128 is used below */ /* shadow */ - uiSetRoundBox(15); + uiSetRoundBox(UI_CNR_ALL); ui_dropshadow(rct, hiddenrad, snode->aspect, node->flag & SELECT); /* body */ |