diff options
author | culler <culler> | 2019-03-30 17:29:31 (GMT) |
---|---|---|
committer | culler <culler> | 2019-03-30 17:29:31 (GMT) |
commit | 761cdb86562088f0dd44c45d314dce97acd38a79 (patch) | |
tree | 577e0fbc69f67a196ad2f01808c1a759ed064563 /macosx/tkMacOSXButton.c | |
parent | ab7aa7d7f951b4cc5821e902bb952901b5b9bf9c (diff) | |
download | tk-761cdb86562088f0dd44c45d314dce97acd38a79.zip tk-761cdb86562088f0dd44c45d314dce97acd38a79.tar.gz tk-761cdb86562088f0dd44c45d314dce97acd38a79.tar.bz2 |
Correctly distinguish between -highlightcolor and -highlightbackground and
revert unnecessary changes to the label manual.
Diffstat (limited to 'macosx/tkMacOSXButton.c')
-rw-r--r-- | macosx/tkMacOSXButton.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c index 23596d4..8ccfdb3 100644 --- a/macosx/tkMacOSXButton.c +++ b/macosx/tkMacOSXButton.c @@ -225,14 +225,13 @@ TkpDisplayButton( /* Draw highlight border, if needed. */ if (needhighlight) { - if ((butPtr->flags & GOT_FOCUS || butPtr->type == TYPE_LABEL)) { - GC gc; - if (butPtr->highlightColorPtr) { - gc = Tk_GCForColor(butPtr->highlightColorPtr, pixmap); - } else { - gc = Tk_GCForColor(Tk_3DBorderColor(butPtr->highlightBorder), - pixmap); - } + GC gc = NULL; + if ((butPtr->flags & GOT_FOCUS) && butPtr->highlightColorPtr) { + gc = Tk_GCForColor(butPtr->highlightColorPtr, pixmap); + } else if (butPtr->type == TYPE_LABEL) { + gc = Tk_GCForColor(Tk_3DBorderColor(butPtr->highlightBorder), pixmap); + } + if (gc) { TkMacOSXDrawSolidBorder(tkwin, gc, 0, butPtr->highlightWidth); } } |