gitk: Improve appearance of radiobuttons and checkbuttons
Commit 5497f7a2 ("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: NPaul Mackerras <paulus@samba.org>
Showing
想要评论请 注册 或 登录