diff options
author | fvogel <fvogelnew1@free.fr> | 2019-03-31 12:52:10 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2019-03-31 12:52:10 (GMT) |
commit | d84fefbe9128b55dfa168232174559c52e11011e (patch) | |
tree | 91240d792a399926a64a1e5e046c9e23b946ac06 /win | |
parent | 8139b018a833b0ef8c1263ff3e6b90a45fcbaf99 (diff) | |
download | tk-d84fefbe9128b55dfa168232174559c52e11011e.zip tk-d84fefbe9128b55dfa168232174559c52e11011e.tar.gz tk-d84fefbe9128b55dfa168232174559c52e11011e.tar.bz2 |
Make labels, checkbuttons and radiobuttons honor -highlightbackground and -highlightcolor options on Windows.
Diffstat (limited to 'win')
-rw-r--r-- | win/tkWinButton.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/win/tkWinButton.c b/win/tkWinButton.c index ee0ce82..f101f89 100644 --- a/win/tkWinButton.c +++ b/win/tkWinButton.c @@ -410,7 +410,7 @@ TkpDisplayButton( ? butPtr->highlightWidth : 0); offset = 1; } else { - defaultWidth = 0; + defaultWidth = butPtr->highlightWidth;; if ((butPtr->type >= TYPE_CHECK_BUTTON) && !butPtr->indicatorOn) { offset = 1; } else { @@ -759,17 +759,23 @@ TkpDisplayButton( butPtr->borderWidth, relief); } if (defaultWidth != 0) { + int highlightColor = + (int) Tk_3DBorderColor(butPtr->highlightBorder)->pixel; + dc = TkWinGetDrawableDC(butPtr->display, pixmap, &state); + if (butPtr->flags & GOT_FOCUS) { + highlightColor = (int) butPtr->highlightColorPtr->pixel; + } TkWinFillRect(dc, 0, 0, Tk_Width(tkwin), defaultWidth, - (int) butPtr->highlightColorPtr->pixel); + highlightColor); TkWinFillRect(dc, 0, 0, defaultWidth, Tk_Height(tkwin), - (int) butPtr->highlightColorPtr->pixel); + highlightColor); TkWinFillRect(dc, 0, Tk_Height(tkwin) - defaultWidth, Tk_Width(tkwin), defaultWidth, - (int) butPtr->highlightColorPtr->pixel); + highlightColor); TkWinFillRect(dc, Tk_Width(tkwin) - defaultWidth, 0, defaultWidth, Tk_Height(tkwin), - (int) butPtr->highlightColorPtr->pixel); + highlightColor); TkWinReleaseDrawableDC(pixmap, dc, &state); } |