@@ -720,7 +720,9 @@ proc rmsel_tag {text} {
720720 -background [ $text cget -background] \
721721 -foreground [ $text cget -foreground] \
722722 -borderwidth 0
723- $text tag conf in_sel -background lightgray
723+ $text tag conf in_sel\
724+ -background $color::select_bg \
725+ -foreground $color::select_fg
724726 bind $text <Motion> break
725727 return $text
726728}
@@ -863,6 +865,7 @@ proc apply_config {} {
863865 set NS ttk
864866 bind [ winfo class .] <<ThemeChanged>> [ list InitTheme]
865867 pave_toplevel .
868+ color::sync_with_theme
866869 }
867870 }
868871}
@@ -947,15 +950,15 @@ if {![regsub {^git version } $_git_version {} _git_version]} {
947950}
948951
949952proc get_trimmed_version {s} {
950- set r {}
951- foreach x [ split $s -._] {
952- if {[ string is integer -strict $x ] } {
953- lappend r $x
954- } else {
955- break
956- }
957- }
958- return [ join $r .]
953+ set r {}
954+ foreach x [ split $s -._] {
955+ if {[ string is integer -strict $x ] } {
956+ lappend r $x
957+ } else {
958+ break
959+ }
960+ }
961+ return [ join $r .]
959962}
960963set _real_git_version $_git_version
961964set _git_version [ get_trimmed_version $_git_version ]
@@ -967,7 +970,7 @@ if {![regexp {^[1-9]+(\.[0-9]+)+$} $_git_version]} {
967970 -type yesno \
968971 -default no \
969972 -title " [ appname] : warning" \
970- -message [mc " Git version cannot be determined.
973+ -message [mc " Git version cannot be determined.
971974
972975%s claims it is version '%s'.
973976
@@ -1653,7 +1656,7 @@ proc prepare_commit_msg_hook_wait {fd_ph} {
16531656 set pch_error {}
16541657 catch {file delete [ gitdir PREPARE_COMMIT_MSG] }
16551658 return
1656- }
1659+ }
16571660 fconfigure $fd_ph -blocking 0
16581661 catch {file delete [ gitdir PREPARE_COMMIT_MSG] }
16591662}
@@ -2001,72 +2004,72 @@ set filemask {
20012004#define mask_width 14
20022005#define mask_height 15
20032006static unsigned char mask_bits[ ] = {
2004- 0xfe, 0x1f, 0xfe, 0x1f, 0xfe, 0x1f, 0xfe, 0x1f, 0xfe, 0x1f, 0xfe, 0x1f,
2005- 0xfe, 0x1f, 0xfe, 0x1f, 0xfe, 0x1f, 0xfe, 0x1f, 0xfe, 0x1f, 0xfe, 0x1f,
2006- 0xfe, 0x1f, 0xfe, 0x1f, 0xfe, 0x1f};
2007+ 0xfe, 0x1f, 0xfe, 0x1f, 0xfe, 0x1f, 0xfe, 0x1f, 0xfe, 0x1f, 0xfe, 0x1f,
2008+ 0xfe, 0x1f, 0xfe, 0x1f, 0xfe, 0x1f, 0xfe, 0x1f, 0xfe, 0x1f, 0xfe, 0x1f,
2009+ 0xfe, 0x1f, 0xfe, 0x1f, 0xfe, 0x1f};
20072010}
20082011
20092012image create bitmap file_plain -background white -foreground black -data {
20102013#define plain_width 14
20112014#define plain_height 15
20122015static unsigned char plain_bits[ ] = {
2013- 0xfe, 0x01, 0x02, 0x03, 0x02, 0x05, 0x02, 0x09, 0x02, 0x1f, 0x02, 0x10,
2014- 0x02, 0x10, 0x02, 0x10, 0x02, 0x10, 0x02, 0x10, 0x02, 0x10, 0x02, 0x10,
2015- 0x02, 0x10, 0x02, 0x10, 0xfe, 0x1f};
2016+ 0xfe, 0x01, 0x02, 0x03, 0x02, 0x05, 0x02, 0x09, 0x02, 0x1f, 0x02, 0x10,
2017+ 0x02, 0x10, 0x02, 0x10, 0x02, 0x10, 0x02, 0x10, 0x02, 0x10, 0x02, 0x10,
2018+ 0x02, 0x10, 0x02, 0x10, 0xfe, 0x1f};
20162019} -maskdata $filemask
20172020
20182021image create bitmap file_mod -background white -foreground blue -data {
20192022#define mod_width 14
20202023#define mod_height 15
20212024static unsigned char mod_bits[ ] = {
2022- 0xfe, 0x01, 0x02, 0x03, 0x7a, 0x05, 0x02, 0x09, 0x7a, 0x1f, 0x02, 0x10,
2023- 0xfa, 0x17, 0x02, 0x10, 0xfa, 0x17, 0x02, 0x10, 0xfa, 0x17, 0x02, 0x10,
2024- 0xfa, 0x17, 0x02, 0x10, 0xfe, 0x1f};
2025+ 0xfe, 0x01, 0x02, 0x03, 0x7a, 0x05, 0x02, 0x09, 0x7a, 0x1f, 0x02, 0x10,
2026+ 0xfa, 0x17, 0x02, 0x10, 0xfa, 0x17, 0x02, 0x10, 0xfa, 0x17, 0x02, 0x10,
2027+ 0xfa, 0x17, 0x02, 0x10, 0xfe, 0x1f};
20252028} -maskdata $filemask
20262029
20272030image create bitmap file_fulltick -background white -foreground " #007000" -data {
20282031#define file_fulltick_width 14
20292032#define file_fulltick_height 15
20302033static unsigned char file_fulltick_bits[ ] = {
2031- 0xfe, 0x01, 0x02, 0x1a, 0x02, 0x0c, 0x02, 0x0c, 0x02, 0x16, 0x02, 0x16,
2032- 0x02, 0x13, 0x00, 0x13, 0x86, 0x11, 0x8c, 0x11, 0xd8, 0x10, 0xf2, 0x10,
2033- 0x62, 0x10, 0x02, 0x10, 0xfe, 0x1f};
2034+ 0xfe, 0x01, 0x02, 0x1a, 0x02, 0x0c, 0x02, 0x0c, 0x02, 0x16, 0x02, 0x16,
2035+ 0x02, 0x13, 0x00, 0x13, 0x86, 0x11, 0x8c, 0x11, 0xd8, 0x10, 0xf2, 0x10,
2036+ 0x62, 0x10, 0x02, 0x10, 0xfe, 0x1f};
20342037} -maskdata $filemask
20352038
20362039image create bitmap file_question -background white -foreground black -data {
20372040#define file_question_width 14
20382041#define file_question_height 15
20392042static unsigned char file_question_bits[ ] = {
2040- 0xfe, 0x01, 0x02, 0x02, 0xe2, 0x04, 0xf2, 0x09, 0x1a, 0x1b, 0x0a, 0x13,
2041- 0x82, 0x11, 0xc2, 0x10, 0x62, 0x10, 0x62, 0x10, 0x02, 0x10, 0x62, 0x10,
2042- 0x62, 0x10, 0x02, 0x10, 0xfe, 0x1f};
2043+ 0xfe, 0x01, 0x02, 0x02, 0xe2, 0x04, 0xf2, 0x09, 0x1a, 0x1b, 0x0a, 0x13,
2044+ 0x82, 0x11, 0xc2, 0x10, 0x62, 0x10, 0x62, 0x10, 0x02, 0x10, 0x62, 0x10,
2045+ 0x62, 0x10, 0x02, 0x10, 0xfe, 0x1f};
20432046} -maskdata $filemask
20442047
20452048image create bitmap file_removed -background white -foreground red -data {
20462049#define file_removed_width 14
20472050#define file_removed_height 15
20482051static unsigned char file_removed_bits[ ] = {
2049- 0xfe, 0x01, 0x02, 0x03, 0x02, 0x05, 0x02, 0x09, 0x02, 0x1f, 0x02, 0x10,
2050- 0x1a, 0x16, 0x32, 0x13, 0xe2, 0x11, 0xc2, 0x10, 0xe2, 0x11, 0x32, 0x13,
2051- 0x1a, 0x16, 0x02, 0x10, 0xfe, 0x1f};
2052+ 0xfe, 0x01, 0x02, 0x03, 0x02, 0x05, 0x02, 0x09, 0x02, 0x1f, 0x02, 0x10,
2053+ 0x1a, 0x16, 0x32, 0x13, 0xe2, 0x11, 0xc2, 0x10, 0xe2, 0x11, 0x32, 0x13,
2054+ 0x1a, 0x16, 0x02, 0x10, 0xfe, 0x1f};
20522055} -maskdata $filemask
20532056
20542057image create bitmap file_merge -background white -foreground blue -data {
20552058#define file_merge_width 14
20562059#define file_merge_height 15
20572060static unsigned char file_merge_bits[ ] = {
2058- 0xfe, 0x01, 0x02, 0x03, 0x62, 0x05, 0x62, 0x09, 0x62, 0x1f, 0x62, 0x10,
2059- 0xfa, 0x11, 0xf2, 0x10, 0x62, 0x10, 0x02, 0x10, 0xfa, 0x17, 0x02, 0x10,
2060- 0xfa, 0x17, 0x02, 0x10, 0xfe, 0x1f};
2061+ 0xfe, 0x01, 0x02, 0x03, 0x62, 0x05, 0x62, 0x09, 0x62, 0x1f, 0x62, 0x10,
2062+ 0xfa, 0x11, 0xf2, 0x10, 0x62, 0x10, 0x02, 0x10, 0xfa, 0x17, 0x02, 0x10,
2063+ 0xfa, 0x17, 0x02, 0x10, 0xfe, 0x1f};
20612064} -maskdata $filemask
20622065
20632066image create bitmap file_statechange -background white -foreground green -data {
20642067#define file_statechange_width 14
20652068#define file_statechange_height 15
20662069static unsigned char file_statechange_bits[ ] = {
2067- 0xfe, 0x01, 0x02, 0x03, 0x02, 0x05, 0x02, 0x09, 0x02, 0x1f, 0x62, 0x10,
2068- 0x62, 0x10, 0xba, 0x11, 0xba, 0x11, 0x62, 0x10, 0x62, 0x10, 0x02, 0x10,
2069- 0x02, 0x10, 0x02, 0x10, 0xfe, 0x1f};
2070+ 0xfe, 0x01, 0x02, 0x03, 0x02, 0x05, 0x02, 0x09, 0x02, 0x1f, 0x62, 0x10,
2071+ 0x62, 0x10, 0xba, 0x11, 0xba, 0x11, 0x62, 0x10, 0x62, 0x10, 0x02, 0x10,
2072+ 0x02, 0x10, 0x02, 0x10, 0xfe, 0x1f};
20702073} -maskdata $filemask
20712074
20722075set ui_index .vpane.files.index.list
@@ -3272,7 +3275,7 @@ pack .vpane -anchor n -side top -fill both -expand 1
32723275textframe .vpane.files.workdir -height 100 -width 200
32733276tlabel .vpane.files.workdir.title -text [ mc " Unstaged Changes" ] \
32743277 -background lightsalmon -foreground black
3275- ttext $ui_workdir -background white -foreground black \
3278+ ttext $ui_workdir \
32763279 -borderwidth 0 \
32773280 -width 20 -height 10 \
32783281 -wrap none \
@@ -3294,7 +3297,7 @@ textframe .vpane.files.index -height 100 -width 200
32943297tlabel .vpane.files.index.title \
32953298 -text [ mc " Staged Changes (Will Commit)" ] \
32963299 -background lightgreen -foreground black
3297- ttext $ui_index -background white -foreground black \
3300+ ttext $ui_index \
32983301 -borderwidth 0 \
32993302 -width 20 -height 10 \
33003303 -wrap none \
@@ -3321,7 +3324,9 @@ if {!$use_ttk} {
33213324
33223325foreach i [ list $ui_index $ui_workdir ] {
33233326 rmsel_tag $i
3324- $i tag conf in_diff -background [ $i tag cget in_sel -background]
3327+ $i tag conf in_diff \
3328+ -background $color::select_bg \
3329+ -foreground $color::select_fg
33253330}
33263331unset i
33273332
@@ -3429,7 +3434,7 @@ if {![is_enabled nocommit]} {
34293434}
34303435
34313436textframe .vpane.lower.commarea.buffer.frame
3432- ttext $ui_comm -background white -foreground black \
3437+ ttext $ui_comm \
34333438 -borderwidth 1 \
34343439 -undo true \
34353440 -maxundo 20 \
@@ -3558,7 +3563,7 @@ bind .vpane.lower.diff.header.path <Button-1> {do_file_open $current_diff_path}
35583563#
35593564textframe .vpane.lower.diff.body
35603565set ui_diff .vpane.lower.diff.body.t
3561- ttext $ui_diff -background white -foreground black \
3566+ ttext $ui_diff \
35623567 -borderwidth 0 \
35633568 -width 80 -height 5 -wrap none \
35643569 -font font_diff \
@@ -3878,18 +3883,18 @@ proc on_application_mapped {} {
38783883 set gm $repo_config(gui.geometry)
38793884 if {$use_ttk } {
38803885 bind .vpane <Map> \
3881- [ list on_ttk_pane_mapped %W 0 [lindex $gm 1] ]
3886+ [ list on_ttk_pane_mapped %W 0 [lindex $gm 1] ]
38823887 bind .vpane.files <Map> \
3883- [ list on_ttk_pane_mapped %W 0 [lindex $gm 2] ]
3888+ [ list on_ttk_pane_mapped %W 0 [lindex $gm 2] ]
38843889 } else {
38853890 bind .vpane <Map> \
3886- [ list on_tk_pane_mapped %W 0 \
3887- [lindex $gm 1] \
3888- [ lindex [.vpane sash coord 0] 1]]
3891+ [ list on_tk_pane_mapped %W 0 \
3892+ [lindex $gm 1] \
3893+ [ lindex [.vpane sash coord 0] 1]]
38893894 bind .vpane.files <Map> \
3890- [ list on_tk_pane_mapped %W 0 \
3891- [lindex [.vpane.files sash coord 0] 0] \
3892- [ lindex $gm 2] ]
3895+ [ list on_tk_pane_mapped %W 0 \
3896+ [lindex [.vpane.files sash coord 0] 0] \
3897+ [ lindex $gm 2] ]
38933898 }
38943899 wm geometry . [ lindex $gm 0]
38953900}
0 commit comments