Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Make labels, checkbuttons and radiobuttons honor -highlightbackground and -highlightcolor options on Windows. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | bug-1001070 |
Files: | files | file ages | folders |
SHA3-256: |
3a96d3de8d55febf2c1c2dd73e6d16af |
User & Date: | fvogel 2019-03-31 12:52:10.294 |
Original Comment: | Make labels, checkbuttons and radiobuttons honor -highlightbackground and -highlightcolor options. |
References
2019-03-31
| ||
13:05 | • Ticket [1001070f] Mac label doesn't display -highlightbackground status still Open with 3 other changes artifact: f15b247e user: fvogel | |
Context
2019-03-31
| ||
14:34 | Restore behavior of checkbuttons and radiobuttons on Windows. They again do not take -highlightbackground into account, in an attempt to follow platform specific conventions. The code now only changes this for labels. check-in: f1c0ab90 user: fvogel tags: bug-1001070 | |
12:52 | Make labels, checkbuttons and radiobuttons honor -highlightbackground and -highlightcolor options on Windows. check-in: 3a96d3de user: fvogel tags: bug-1001070 | |
11:01 | Remove an unused variable, squelching a compiler warning. check-in: ffb39c14 user: fvogel tags: bug-1001070 | |
Changes
Changes to win/tkWinButton.c.
︙ | ︙ | |||
406 407 408 409 410 411 412 | */ if (butPtr->type == TYPE_BUTTON) { defaultWidth = ((butPtr->defaultState == DEFAULT_ACTIVE) ? butPtr->highlightWidth : 0); offset = 1; } else { | | | 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 | */ if (butPtr->type == TYPE_BUTTON) { defaultWidth = ((butPtr->defaultState == DEFAULT_ACTIVE) ? butPtr->highlightWidth : 0); offset = 1; } else { defaultWidth = butPtr->highlightWidth;; if ((butPtr->type >= TYPE_CHECK_BUTTON) && !butPtr->indicatorOn) { offset = 1; } else { offset = 0; } } |
︙ | ︙ | |||
755 756 757 758 759 760 761 762 763 | Tk_Draw3DRectangle(tkwin, pixmap, border, defaultWidth, defaultWidth, Tk_Width(tkwin) - 2*defaultWidth, Tk_Height(tkwin) - 2*defaultWidth, butPtr->borderWidth, relief); } if (defaultWidth != 0) { dc = TkWinGetDrawableDC(butPtr->display, pixmap, &state); TkWinFillRect(dc, 0, 0, Tk_Width(tkwin), defaultWidth, | > > > > > > | | | | | 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 | Tk_Draw3DRectangle(tkwin, pixmap, border, defaultWidth, defaultWidth, Tk_Width(tkwin) - 2*defaultWidth, Tk_Height(tkwin) - 2*defaultWidth, 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, highlightColor); TkWinFillRect(dc, 0, 0, defaultWidth, Tk_Height(tkwin), highlightColor); TkWinFillRect(dc, 0, Tk_Height(tkwin) - defaultWidth, Tk_Width(tkwin), defaultWidth, highlightColor); TkWinFillRect(dc, Tk_Width(tkwin) - defaultWidth, 0, defaultWidth, Tk_Height(tkwin), highlightColor); TkWinReleaseDrawableDC(pixmap, dc, &state); } if (butPtr->flags & GOT_FOCUS) { Tk_SetCaretPos(tkwin, x, y, 0 /* not used */); } |
︙ | ︙ |