@@ -720,7 +720,9 @@ proc rmsel_tag {text} {
720
720
-background [ $text cget -background] \
721
721
-foreground [ $text cget -foreground] \
722
722
-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
724
726
bind $text <Motion> break
725
727
return $text
726
728
}
@@ -863,6 +865,7 @@ proc apply_config {} {
863
865
set NS ttk
864
866
bind [ winfo class .] <<ThemeChanged>> [ list InitTheme]
865
867
pave_toplevel .
868
+ color::sync_with_theme
866
869
}
867
870
}
868
871
}
@@ -947,15 +950,15 @@ if {![regsub {^git version } $_git_version {} _git_version]} {
947
950
}
948
951
949
952
proc 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 .]
959
962
}
960
963
set _real_git_version $_git_version
961
964
set _git_version [ get_trimmed_version $_git_version ]
@@ -967,7 +970,7 @@ if {![regexp {^[1-9]+(\.[0-9]+)+$} $_git_version]} {
967
970
-type yesno \
968
971
-default no \
969
972
-title " [ appname] : warning" \
970
- -message [mc " Git version cannot be determined.
973
+ -message [mc " Git version cannot be determined.
971
974
972
975
%s claims it is version '%s'.
973
976
@@ -1653,7 +1656,7 @@ proc prepare_commit_msg_hook_wait {fd_ph} {
1653
1656
set pch_error {}
1654
1657
catch {file delete [ gitdir PREPARE_COMMIT_MSG] }
1655
1658
return
1656
- }
1659
+ }
1657
1660
fconfigure $fd_ph -blocking 0
1658
1661
catch {file delete [ gitdir PREPARE_COMMIT_MSG] }
1659
1662
}
@@ -2001,72 +2004,72 @@ set filemask {
2001
2004
#define mask_width 14
2002
2005
#define mask_height 15
2003
2006
static 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};
2007
2010
}
2008
2011
2009
2012
image create bitmap file_plain -background white -foreground black -data {
2010
2013
#define plain_width 14
2011
2014
#define plain_height 15
2012
2015
static 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};
2016
2019
} -maskdata $filemask
2017
2020
2018
2021
image create bitmap file_mod -background white -foreground blue -data {
2019
2022
#define mod_width 14
2020
2023
#define mod_height 15
2021
2024
static 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};
2025
2028
} -maskdata $filemask
2026
2029
2027
2030
image create bitmap file_fulltick -background white -foreground " #007000" -data {
2028
2031
#define file_fulltick_width 14
2029
2032
#define file_fulltick_height 15
2030
2033
static 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};
2034
2037
} -maskdata $filemask
2035
2038
2036
2039
image create bitmap file_question -background white -foreground black -data {
2037
2040
#define file_question_width 14
2038
2041
#define file_question_height 15
2039
2042
static 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};
2043
2046
} -maskdata $filemask
2044
2047
2045
2048
image create bitmap file_removed -background white -foreground red -data {
2046
2049
#define file_removed_width 14
2047
2050
#define file_removed_height 15
2048
2051
static 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};
2052
2055
} -maskdata $filemask
2053
2056
2054
2057
image create bitmap file_merge -background white -foreground blue -data {
2055
2058
#define file_merge_width 14
2056
2059
#define file_merge_height 15
2057
2060
static 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};
2061
2064
} -maskdata $filemask
2062
2065
2063
2066
image create bitmap file_statechange -background white -foreground green -data {
2064
2067
#define file_statechange_width 14
2065
2068
#define file_statechange_height 15
2066
2069
static 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};
2070
2073
} -maskdata $filemask
2071
2074
2072
2075
set ui_index .vpane.files.index.list
@@ -3272,7 +3275,7 @@ pack .vpane -anchor n -side top -fill both -expand 1
3272
3275
textframe .vpane.files.workdir -height 100 -width 200
3273
3276
tlabel .vpane.files.workdir.title -text [ mc " Unstaged Changes" ] \
3274
3277
-background lightsalmon -foreground black
3275
- ttext $ui_workdir -background white -foreground black \
3278
+ ttext $ui_workdir \
3276
3279
-borderwidth 0 \
3277
3280
-width 20 -height 10 \
3278
3281
-wrap none \
@@ -3294,7 +3297,7 @@ textframe .vpane.files.index -height 100 -width 200
3294
3297
tlabel .vpane.files.index.title \
3295
3298
-text [ mc " Staged Changes (Will Commit)" ] \
3296
3299
-background lightgreen -foreground black
3297
- ttext $ui_index -background white -foreground black \
3300
+ ttext $ui_index \
3298
3301
-borderwidth 0 \
3299
3302
-width 20 -height 10 \
3300
3303
-wrap none \
@@ -3321,7 +3324,9 @@ if {!$use_ttk} {
3321
3324
3322
3325
foreach i [ list $ui_index $ui_workdir ] {
3323
3326
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
3325
3330
}
3326
3331
unset i
3327
3332
@@ -3429,7 +3434,7 @@ if {![is_enabled nocommit]} {
3429
3434
}
3430
3435
3431
3436
textframe .vpane.lower.commarea.buffer.frame
3432
- ttext $ui_comm -background white -foreground black \
3437
+ ttext $ui_comm \
3433
3438
-borderwidth 1 \
3434
3439
-undo true \
3435
3440
-maxundo 20 \
@@ -3558,7 +3563,7 @@ bind .vpane.lower.diff.header.path <Button-1> {do_file_open $current_diff_path}
3558
3563
#
3559
3564
textframe .vpane.lower.diff.body
3560
3565
set ui_diff .vpane.lower.diff.body.t
3561
- ttext $ui_diff -background white -foreground black \
3566
+ ttext $ui_diff \
3562
3567
-borderwidth 0 \
3563
3568
-width 80 -height 5 -wrap none \
3564
3569
-font font_diff \
@@ -3878,18 +3883,18 @@ proc on_application_mapped {} {
3878
3883
set gm $repo_config(gui.geometry)
3879
3884
if {$use_ttk } {
3880
3885
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] ]
3882
3887
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] ]
3884
3889
} else {
3885
3890
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]]
3889
3894
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] ]
3893
3898
}
3894
3899
wm geometry . [ lindex $gm 0]
3895
3900
}
0 commit comments