Re: [PATCH 1/3] gitk: Avoid calling tk_setPalette on Windows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jonathan Nieder <jrnieder@xxxxxxxxx> writes:

>Pat Thoyts wrote:
>
>> Signed-off-by: Pat Thoyts <patthoyts@xxxxxxxxxxxxxxxxxxxxx>
>> ---
>>  gitk |    1 +
>>  1 files changed, 1 insertions(+), 0 deletions(-)
>> 
>> diff --git a/gitk b/gitk
>> index 1f36a3e..dc9b8a8 100755
>> --- a/gitk
>> +++ b/gitk
>> @@ -10845,10 +10845,11 @@ proc setselbg {c} {
>>  
>>  # This sets the background color and the color scheme for the whole UI.
>>  # For some reason, tk_setPalette chooses a nasty dark red for selectColor
>>  # if we don't specify one ourselves, which makes the checkbuttons and
>>  # radiobuttons look bad.  This chooses white for selectColor if the
>>  # background color is light, or black if it is dark.
>>  proc setui {c} {
>> +    if {[tk windowingsystem] eq "win32"} { return }
>
>Do you know whether the situation described by the comment has been addressed
>for Tk?  Maybe gitk could check for an appropriate Tk version to avoid this
>workaround on all platforms.

This has never been true for Windows which has always used the native
images for check and radio buttons. So the comment there is relevant
only to X11. I believe in Tk 8.5 the check/radio buttons now use
images by default (the ttk versions will look appropriate to the
current theme - however that may be defined).

However, messing about with this on X11 would need testing that I
can't do on Windows. Hence the suggested fix.

-- 
Pat Thoyts                            http://www.patthoyts.tk/
PGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]