author | Paul Mackerras <paulus@samba.org> | |
Sat, 14 Nov 2009 10:15:01 +0000 (21:15 +1100) | ||
committer | Paul Mackerras <paulus@samba.org> | |
Sat, 14 Nov 2009 10:15:01 +0000 (21:15 +1100) | ||
commit | 51a7e8b654a0f06dde6f66ae89a35297cea09168 | |
tree | b3383a1a979cb87e6144f0ed260d0faa146872c7 | tree | snapshot |
parent | 8d849957d81fc0480a52570d66cc3c2a688ecb1b | commit | diff |
gitk: Improve appearance of radiobuttons and checkbuttons
Commit 5497f7a23ac11f9b230892220d5ed80263eedd1f ("gitk: Add configuration
for UI colour scheme") added a call to tk_setPalette at startup.
Unfortunately, tk_setPalette always chooses a dark red color for
the selectColor value if none is given explicitly, and this makes
checkbuttons and radiobuttons look rather bad.
This restores the previous appearance by specifying selectColor
explicitly. For light backgrounds we use white for selectColor, and
for dark backgrounds we use black. The formula and threshold for
distinguishing light from dark are the same as used in tk_setPalette
for choosing the foreground color.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Commit 5497f7a23ac11f9b230892220d5ed80263eedd1f ("gitk: Add configuration
for UI colour scheme") added a call to tk_setPalette at startup.
Unfortunately, tk_setPalette always chooses a dark red color for
the selectColor value if none is given explicitly, and this makes
checkbuttons and radiobuttons look rather bad.
This restores the previous appearance by specifying selectColor
explicitly. For light backgrounds we use white for selectColor, and
for dark backgrounds we use black. The formula and threshold for
distinguishing light from dark are the same as used in tk_setPalette
for choosing the foreground color.
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk | diff | blob | history |