From: Matthew Fernandez Date: Sat, 14 Jan 2023 05:31:47 +0000 (-0800) Subject: glcomp: remove 'borderType' that is always set to 'glBorderSolid' X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e41d4a342546a89e5c2716b5ea3b2a9309cbda96;p=graphviz glcomp: remove 'borderType' that is always set to 'glBorderSolid' --- diff --git a/lib/glcomp/glcompbutton.c b/lib/glcomp/glcompbutton.c index ac463fdf5..5c3671f3a 100644 --- a/lib/glcomp/glcompbutton.c +++ b/lib/glcomp/glcompbutton.c @@ -32,8 +32,6 @@ glCompButton *glCompButtonNew(glCompObj * par, GLfloat x, GLfloat y, p->common.color.B = GLCOMPSET_BUTTON_COLOR_B; p->common.color.A = GLCOMPSET_BUTTON_COLOR_ALPHA; - p->common.borderType = glBorderSolid; - p->common.borderWidth = GLCOMPSET_BUTTON_BEVEL; p->common.width = w; diff --git a/lib/glcomp/glcompdefs.h b/lib/glcomp/glcompdefs.h index 0c073fec0..3c8fb4502 100644 --- a/lib/glcomp/glcompdefs.h +++ b/lib/glcomp/glcompdefs.h @@ -86,8 +86,6 @@ extern "C" { glFontVJustifyBottom, glFontVJustifyCenter } glCompVJustify; typedef enum { glFontHJustifyNone, glFontHJustifyLeft, glFontHJustifyRight, glFontHJustifyCenter } glCompHJustify; - typedef enum { glBorderNone, glBorderSolid, glBorderBevel, - glBorderCustom } glCompBorderType; typedef enum { glMouseDown, glMouseUp } glCompMouseStatus; typedef enum { glMouseLeftButton, glMouseRightButton, @@ -221,7 +219,6 @@ extern "C" { glCompPoint refPos; /*calculated pos after anchors and aligns */ GLfloat width, height; GLfloat borderWidth; - glCompBorderType borderType; glCompColor color; int enabled; int visible; diff --git a/lib/glcomp/glcompset.c b/lib/glcomp/glcompset.c index b1815b147..be6e30a6a 100644 --- a/lib/glcomp/glcompset.c +++ b/lib/glcomp/glcompset.c @@ -149,7 +149,6 @@ void glCompInitCommon(glCompObj * childObj, glCompObj * parentObj, c->visible = 1; c->pos.x = x; c->pos.y = y; - c->borderType = glBorderSolid; c->borderWidth = GLCOMPSET_BORDERWIDTH; /*NULL function pointers */ diff --git a/lib/glcomp/glutils.c b/lib/glcomp/glutils.c index 7e90eafb4..6466a15ba 100644 --- a/lib/glcomp/glutils.c +++ b/lib/glcomp/glutils.c @@ -215,10 +215,7 @@ void glCompCalcWidget(glCompCommon * parent, glCompCommon * child, child->refPos.y = child->pos.y; return; } - if (parent->borderType == glBorderNone) - borderWidth = 0.0f; - else - borderWidth = parent->borderWidth; + borderWidth = parent->borderWidth; if (child->align != glAlignNone) //if alignment, make sure width and height is no greater than parent { if (child->width > parent->width)