Commit 51a7e8b
committed
gitk: Improve appearance of radiobuttons and checkbuttons
Commit 5497f7a ("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>1 parent 8d84995 commit 51a7e8b
1 file changed
+12
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10596 | 10596 | | |
10597 | 10597 | | |
10598 | 10598 | | |
| 10599 | + | |
| 10600 | + | |
| 10601 | + | |
| 10602 | + | |
| 10603 | + | |
10599 | 10604 | | |
10600 | | - | |
| 10605 | + | |
| 10606 | + | |
| 10607 | + | |
| 10608 | + | |
| 10609 | + | |
| 10610 | + | |
10601 | 10611 | | |
10602 | 10612 | | |
10603 | 10613 | | |
| |||
11159 | 11169 | | |
11160 | 11170 | | |
11161 | 11171 | | |
11162 | | - | |
| 11172 | + | |
11163 | 11173 | | |
11164 | 11174 | | |
11165 | 11175 | | |
| |||
0 commit comments