From 6518d966d6d2c33607b4b32f7309aae2e1b29b2c Mon Sep 17 00:00:00 2001 From: lecoanet Date: Wed, 2 Apr 2003 08:38:14 +0000 Subject: * Modifs afin que le gradient de relief utilis� pour dessiner la bordure de fen�tre ne soit allou� que si le relief est effectivement utilis�. --- generic/tkZinc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'generic/tkZinc.c') diff --git a/generic/tkZinc.c b/generic/tkZinc.c index 433535c..1a8a3f0 100644 --- a/generic/tkZinc.c +++ b/generic/tkZinc.c @@ -5082,8 +5082,10 @@ Configure(Tcl_Interp *interp,/* Used for error reporting. */ if (wi->relief_grad) { ZnFreeGradient(wi->relief_grad); } - wi->relief_grad = ZnGetReliefGradient(interp, wi->win, - ZnNameOfColor(color), alpha); + if (wi->relief != RELIEF_FLAT) { + wi->relief_grad = ZnGetReliefGradient(interp, wi->win, + ZnNameOfColor(color), alpha); + } } if (CONFIG_PROBE(BACK_COLOR_SPEC) || CONFIG_PROBE(LIGHT_ANGLE_SPEC)) { bbox.orig.x = bbox.orig.y = 0; @@ -6522,7 +6524,7 @@ Repair(WidgetInfo *wi) glVertex2f(wi->highlight_width, wi->highlight_width); glEnd(); } - if (wi->border_width > 0) { + if ((wi->border_width > 0) && (wi->relief != RELIEF_FLAT)) { ZnPoint p[5]; p[4].x = p[4].y = p[3].y = p[1].x = wi->highlight_width; @@ -6613,7 +6615,7 @@ Repair(WidgetInfo *wi) /* * Redraw the borders. */ - if (wi->border_width > 0) { + if ((wi->border_width > 0) && (wi->relief != RELIEF_FLAT)) { Pixmap save; XRectangle r; -- cgit v1.1