Tk Source Code

Check-in [f1c0ab90]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment: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.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | bug-1001070
Files: files | file ages | folders
SHA3-256: f1c0ab90e5efeaa5dc415e63f8420a732d8d9cac45d5665c048785903781aec2
User & Date: fvogel 2019-03-31 14:34:16.439
Context
2019-03-31
14:43
*Really* don't change the behavior for *buttons, even with they have -default active check-in: adf48193 user: fvogel tags: bug-1001070
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
Changes
Unified Diff Ignore Whitespace Patch
Changes to win/tkWinButton.c.
401
402
403
404
405
406
407
408



409
410
411
412
413
414
415
416
417
418
419
420
	}
    }

    /*
     * Compute width of default ring and offset for pushed buttons.
     */

    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;
	}
    }








|
>
>
>




|







401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
	}
    }

    /*
     * Compute width of default ring and offset for pushed buttons.
     */

    if (butPtr->type == TYPE_LABEL) {
	defaultWidth = butPtr->highlightWidth;
        offset = 0;
    } else if (butPtr->type == TYPE_BUTTON) {
	defaultWidth = ((butPtr->defaultState == DEFAULT_ACTIVE)
		? butPtr->highlightWidth : 0);
	offset = 1;
    } else {
	defaultWidth = 0;
	if ((butPtr->type >= TYPE_CHECK_BUTTON) && !butPtr->indicatorOn) {
	    offset = 1;
	} else {
	    offset = 0;
	}
    }