git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Pat Thoyts <patthoyts@users.sourceforge.net>
Date
Mar 22, 2010, 22:52 UTC
Message-ID
<87tys8c6ki.fsf@fox.patthoyts.tk>
In-Reply-To
<20100320063256.GA26519@progeny.tock>
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 24 quoted lines
>Pat Thoyts wrote:
>
>> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
>> ---
>>  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
Previous: Jonathan NiederNext: Jonathan Nieder
Message 9 of 10 in “gitk: Avoid calling tk_setPalette on Windows”
  1. 1/3 gitk: Avoid calling tk_setPalette on WindowsPat Thoyts, Mar 12, 2010
  2. 2/3 gitk: Add emacs editor variable block.Pat Thoyts, Mar 12, 2010
  3. 3/3 gitk: fix display of copyright symbolPat Thoyts, Mar 12, 2010
  4. gitk: Fix display of copyright symbol in non-utf-8 localesJonathan Nieder, Mar 20, 2010
  5. gitk: Update makefile to keep -encoding option for gitk-wishJonathan Nieder, Mar 20, 2010
  6. Pat ThoytsMar 22, 2010
  7. Jonathan NiederMar 22, 2010
  8. Jonathan NiederMar 20, 2010
  9. Pat ThoytsMar 22, 2010
  10. Jonathan NiederMar 23, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.