diff options
-rw-r--r-- | generic/ttk/ttkLabel.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/generic/ttk/ttkLabel.c b/generic/ttk/ttkLabel.c index a4c3647..d94cb23 100644 --- a/generic/ttk/ttkLabel.c +++ b/generic/ttk/ttkLabel.c @@ -130,7 +130,7 @@ static void TextCleanup(TextElement *text) static void TextDraw(TextElement *text, Tk_Window tkwin, Drawable d, Ttk_Box b) { XColor *color = Tk_GetColorFromObj(tkwin, text->foregroundObj); - Tcl_Size underline = TCL_INDEX_NONE; + Tcl_Size underline = INT_MIN; XGCValues gcValues; GC gc1, gc2; Tk_Anchor anchor = TK_ANCHOR_CENTER; @@ -176,12 +176,12 @@ static void TextDraw(TextElement *text, Tk_Window tkwin, Drawable d, Ttk_Box b) if (text->underlineObj != NULL) { TkGetIntForIndex(text->underlineObj, TCL_INDEX_NONE, 0, &underline); - if (underline >= 0) { - if (underline < INT_MIN) { - underline = INT_MIN; - } else if (underline > INT_MAX) { - underline = INT_MAX; - } + if (underline < INT_MIN) { + underline = INT_MIN; + } else if (underline > INT_MAX) { + underline = INT_MAX; + } + if (underline != INT_MIN) { if (text->embossed) { Tk_UnderlineTextLayout(Tk_Display(tkwin), d, gc2, text->textLayout, b.x+1, b.y+1, underline); |