@@ -2026,6 +2026,9 @@ proc makewindow {} {
2026
2026
global highlight_files gdttype
2027
2027
global searchstring sstring
2028
2028
global bgcolor fgcolor bglist fglist diffcolors selectbgcolor
2029
+ global uifgcolor uifgdisabledcolor
2030
+ global filesepbgcolor filesepfgcolor
2031
+ global mergecolors foundbgcolor currentsearchhitbgcolor
2029
2032
global headctxmenu progresscanv progressitem progresscoords statusw
2030
2033
global fprogitem fprogcoord lastprogupdate progupdatepending
2031
2034
global rprogitem rprogcoord rownumsel numcommits
@@ -2177,10 +2180,10 @@ proc makewindow {} {
2177
2180
0x00, 0x38, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0x00, 0x38, 0x00, 0x1c,
2178
2181
0x00, 0x0e, 0x00, 0x07, 0x80, 0x03, 0xc0, 0x01};
2179
2182
}
2180
- image create bitmap bm-left -data $bm_left_data
2181
- image create bitmap bm-left-gray -data $bm_left_data -foreground " #999 "
2182
- image create bitmap bm-right -data $bm_right_data
2183
- image create bitmap bm-right-gray -data $bm_right_data -foreground " #999 "
2183
+ image create bitmap bm-left -data $bm_left_data -foreground $uifgcolor
2184
+ image create bitmap bm-left-gray -data $bm_left_data -foreground $uifgdisabledcolor
2185
+ image create bitmap bm-right -data $bm_right_data -foreground $uifgcolor
2186
+ image create bitmap bm-right-gray -data $bm_right_data -foreground $uifgdisabledcolor
2184
2187
2185
2188
${NS} ::button .tf.bar.leftbut -command goback -state disabled -width 26
2186
2189
if {$use_ttk } {
@@ -2349,32 +2352,32 @@ proc makewindow {} {
2349
2352
lappend fglist $ctext
2350
2353
2351
2354
$ctext tag conf comment -wrap $wrapcomment
2352
- $ctext tag conf filesep -font textfontbold -back " #aaaaaa "
2355
+ $ctext tag conf filesep -font textfontbold -fore $filesepfgcolor - back $filesepbgcolor
2353
2356
$ctext tag conf hunksep -fore [lindex $diffcolors 2]
2354
2357
$ctext tag conf d0 -fore [lindex $diffcolors 0]
2355
2358
$ctext tag conf dresult -fore [lindex $diffcolors 1]
2356
- $ctext tag conf m0 -fore red
2357
- $ctext tag conf m1 -fore blue
2358
- $ctext tag conf m2 -fore green
2359
- $ctext tag conf m3 -fore purple
2360
- $ctext tag conf m4 -fore brown
2361
- $ctext tag conf m5 -fore " #009090 "
2362
- $ctext tag conf m6 -fore magenta
2363
- $ctext tag conf m7 -fore " #808000 "
2364
- $ctext tag conf m8 -fore " #009000 "
2365
- $ctext tag conf m9 -fore " #ff0080 "
2366
- $ctext tag conf m10 -fore cyan
2367
- $ctext tag conf m11 -fore " #b07070 "
2368
- $ctext tag conf m12 -fore " #70b0f0 "
2369
- $ctext tag conf m13 -fore " #70f0b0 "
2370
- $ctext tag conf m14 -fore " #f0b070 "
2371
- $ctext tag conf m15 -fore " #ff70b0 "
2359
+ $ctext tag conf m0 -fore [ lindex $mergecolors 0]
2360
+ $ctext tag conf m1 -fore [ lindex $mergecolors 1]
2361
+ $ctext tag conf m2 -fore [ lindex $mergecolors 2]
2362
+ $ctext tag conf m3 -fore [ lindex $mergecolors 3]
2363
+ $ctext tag conf m4 -fore [ lindex $mergecolors 4]
2364
+ $ctext tag conf m5 -fore [ lindex $mergecolors 5]
2365
+ $ctext tag conf m6 -fore [ lindex $mergecolors 6]
2366
+ $ctext tag conf m7 -fore [ lindex $mergecolors 7]
2367
+ $ctext tag conf m8 -fore [ lindex $mergecolors 8]
2368
+ $ctext tag conf m9 -fore [ lindex $mergecolors 9]
2369
+ $ctext tag conf m10 -fore [ lindex $mergecolors 10]
2370
+ $ctext tag conf m11 -fore [ lindex $mergecolors 11]
2371
+ $ctext tag conf m12 -fore [ lindex $mergecolors 12]
2372
+ $ctext tag conf m13 -fore [ lindex $mergecolors 13]
2373
+ $ctext tag conf m14 -fore [ lindex $mergecolors 14]
2374
+ $ctext tag conf m15 -fore [ lindex $mergecolors 15]
2372
2375
$ctext tag conf mmax -fore darkgrey
2373
2376
set mergemax 16
2374
2377
$ctext tag conf mresult -font textfontbold
2375
2378
$ctext tag conf msep -font textfontbold
2376
- $ctext tag conf found -back yellow
2377
- $ctext tag conf currentsearchhit -back orange
2379
+ $ctext tag conf found -back $foundbgcolor
2380
+ $ctext tag conf currentsearchhit -back $currentsearchhitbgcolor
2378
2381
$ctext tag conf wwrap -wrap word
2379
2382
2380
2383
.pwbottom add .bleft
@@ -2721,6 +2724,14 @@ proc savestuff {w} {
2721
2724
global viewname viewfiles viewargs viewargscmd viewperm nextviewnum
2722
2725
global cmitmode wrapcomment datetimeformat limitdiffs
2723
2726
global colors uicolor bgcolor fgcolor diffcolors diffcontext selectbgcolor
2727
+ global uifgcolor uifgdisabledcolor
2728
+ global headbgcolor headfgcolor headoutlinecolor remotebgcolor
2729
+ global tagbgcolor tagfgcolor tagoutlinecolor
2730
+ global reflinecolor filesepbgcolor filesepfgcolor
2731
+ global mergecolors foundbgcolor currentsearchhitbgcolor
2732
+ global linehoverbgcolor linehoverfgcolor linehoveroutlinecolor circlecolors
2733
+ global mainheadcirclecolor workingfilescirclecolor indexcirclecolor
2734
+ global linkfgcolor circleoutlinecolor
2724
2735
global autoselect autosellen extdifftool perfile_attrs markbgcolor use_ttk
2725
2736
global hideremotes want_ttk maxrefs
2726
2737
@@ -2753,13 +2764,37 @@ proc savestuff {w} {
2753
2764
puts $f [list set want_ttk $want_ttk ]
2754
2765
puts $f [list set bgcolor $bgcolor ]
2755
2766
puts $f [list set fgcolor $fgcolor ]
2767
+ puts $f [list set uifgcolor $uifgcolor ]
2768
+ puts $f [list set uifgdisabledcolor $uifgdisabledcolor ]
2756
2769
puts $f [list set colors $colors ]
2757
2770
puts $f [list set diffcolors $diffcolors ]
2771
+ puts $f [list set mergecolors $mergecolors ]
2758
2772
puts $f [list set markbgcolor $markbgcolor ]
2759
2773
puts $f [list set diffcontext $diffcontext ]
2760
2774
puts $f [list set selectbgcolor $selectbgcolor ]
2775
+ puts $f [list set foundbgcolor $foundbgcolor ]
2776
+ puts $f [list set currentsearchhitbgcolor $currentsearchhitbgcolor ]
2761
2777
puts $f [list set extdifftool $extdifftool ]
2762
2778
puts $f [list set perfile_attrs $perfile_attrs ]
2779
+ puts $f [list set headbgcolor $headbgcolor ]
2780
+ puts $f [list set headfgcolor $headfgcolor ]
2781
+ puts $f [list set headoutlinecolor $headoutlinecolor ]
2782
+ puts $f [list set remotebgcolor $remotebgcolor ]
2783
+ puts $f [list set tagbgcolor $tagbgcolor ]
2784
+ puts $f [list set tagfgcolor $tagfgcolor ]
2785
+ puts $f [list set tagoutlinecolor $tagoutlinecolor ]
2786
+ puts $f [list set reflinecolor $reflinecolor ]
2787
+ puts $f [list set filesepbgcolor $filesepbgcolor ]
2788
+ puts $f [list set filesepfgcolor $filesepfgcolor ]
2789
+ puts $f [list set linehoverbgcolor $linehoverbgcolor ]
2790
+ puts $f [list set linehoverfgcolor $linehoverfgcolor ]
2791
+ puts $f [list set linehoveroutlinecolor $linehoveroutlinecolor ]
2792
+ puts $f [list set mainheadcirclecolor $mainheadcirclecolor ]
2793
+ puts $f [list set workingfilescirclecolor $workingfilescirclecolor ]
2794
+ puts $f [list set indexcirclecolor $indexcirclecolor ]
2795
+ puts $f [list set circlecolors $circlecolors ]
2796
+ puts $f [list set linkfgcolor $linkfgcolor ]
2797
+ puts $f [list set circleoutlinecolor $circleoutlinecolor ]
2763
2798
2764
2799
puts $f " set geometry(main) [ wm geometry .] "
2765
2800
puts $f " set geometry(state) [ wm state .] "
@@ -5925,15 +5960,17 @@ proc drawcmittext {id row col} {
5925
5960
global linehtag linentag linedtag selectedline
5926
5961
global canvxmax boldids boldnameids fgcolor markedid
5927
5962
global mainheadid nullid nullid2 circleitem circlecolors ctxbut
5963
+ global mainheadcirclecolor workingfilescirclecolor indexcirclecolor
5964
+ global circleoutlinecolor
5928
5965
5929
5966
# listed is 0 for boundary, 1 for normal, 2 for negative, 3 for left, 4 for right
5930
5967
set listed $cmitlisted($curview,$id)
5931
5968
if {$id eq $nullid } {
5932
- set ofill red
5969
+ set ofill $workingfilescirclecolor
5933
5970
} elseif {$id eq $nullid2 } {
5934
- set ofill green
5971
+ set ofill $indexcirclecolor
5935
5972
} elseif {$id eq $mainheadid } {
5936
- set ofill yellow
5973
+ set ofill $mainheadcirclecolor
5937
5974
} else {
5938
5975
set ofill [lindex $circlecolors $listed ]
5939
5976
}
@@ -5943,21 +5980,21 @@ proc drawcmittext {id row col} {
5943
5980
if {$listed <= 2} {
5944
5981
set t [$canv create oval [expr {$x - $orad }] [expr {$y - $orad }] \
5945
5982
[expr {$x + $orad - 1}] [expr {$y + $orad - 1}] \
5946
- -fill $ofill -outline $fgcolor -width 1 -tags circle]
5983
+ -fill $ofill -outline $circleoutlinecolor -width 1 -tags circle]
5947
5984
} elseif {$listed == 3} {
5948
5985
# triangle pointing left for left-side commits
5949
5986
set t [$canv create polygon \
5950
5987
[expr {$x - $orad }] $y \
5951
5988
[expr {$x + $orad - 1}] [expr {$y - $orad }] \
5952
5989
[expr {$x + $orad - 1}] [expr {$y + $orad - 1}] \
5953
- -fill $ofill -outline $fgcolor -width 1 -tags circle]
5990
+ -fill $ofill -outline $circleoutlinecolor -width 1 -tags circle]
5954
5991
} else {
5955
5992
# triangle pointing right for right-side commits
5956
5993
set t [$canv create polygon \
5957
5994
[expr {$x + $orad - 1}] $y \
5958
5995
[expr {$x - $orad }] [expr {$y - $orad }] \
5959
5996
[expr {$x - $orad }] [expr {$y + $orad - 1}] \
5960
- -fill $ofill -outline $fgcolor -width 1 -tags circle]
5997
+ -fill $ofill -outline $circleoutlinecolor -width 1 -tags circle]
5961
5998
}
5962
5999
set circleitem($row ) $t
5963
6000
$canv raise $t
@@ -6345,6 +6382,9 @@ proc drawtags {id x xt y1} {
6345
6382
global idtags idheads idotherrefs mainhead
6346
6383
global linespc lthickness
6347
6384
global canv rowtextx curview fgcolor bgcolor ctxbut
6385
+ global headbgcolor headfgcolor headoutlinecolor remotebgcolor
6386
+ global tagbgcolor tagfgcolor tagoutlinecolor
6387
+ global reflinecolor
6348
6388
6349
6389
set marks {}
6350
6390
set ntags 0
@@ -6382,7 +6422,7 @@ proc drawtags {id x xt y1} {
6382
6422
set xt [expr {$xt + $delta + $wid + $lthickness + $linespc }]
6383
6423
}
6384
6424
set t [$canv create line $x $y1 [lindex $xvals end] $y1 \
6385
- -width $lthickness -fill black -tags tag.$id ]
6425
+ -width $lthickness -fill $reflinecolor -tags tag.$id ]
6386
6426
$canv lower $t
6387
6427
foreach tag $marks x $xvals wid $wvals {
6388
6428
set tag_quoted [string map {% %%} $tag ]
@@ -6393,13 +6433,14 @@ proc drawtags {id x xt y1} {
6393
6433
# draw a tag
6394
6434
set t [$canv create polygon $x [expr {$yt + $delta }] $xl $yt \
6395
6435
$xr $yt $xr $yb $xl $yb $x [expr {$yb - $delta }] \
6396
- -width 1 -outline black -fill yellow -tags tag.$id ]
6436
+ -width 1 -outline $tagoutlinecolor -fill $tagbgcolor \
6437
+ -tags tag.$id ]
6397
6438
$canv bind $t <1> [list showtag $tag_quoted 1]
6398
6439
set rowtextx([rowofcommit $id ]) [expr {$xr + $linespc }]
6399
6440
} else {
6400
6441
# draw a head or other ref
6401
6442
if {[incr nheads -1] >= 0} {
6402
- set col green
6443
+ set col $headbgcolor
6403
6444
if {$tag eq $mainhead } {
6404
6445
set font mainfontbold
6405
6446
}
@@ -6415,10 +6456,10 @@ proc drawtags {id x xt y1} {
6415
6456
set yti [expr {$yt + 1}]
6416
6457
set xri [expr {$x + $rwid }]
6417
6458
$canv create polygon $xi $yti $xri $yti $xri $yb $xi $yb \
6418
- -width 0 -fill " #ffddaa " -tags tag.$id
6459
+ -width 0 -fill $remotebgcolor -tags tag.$id
6419
6460
}
6420
6461
}
6421
- set t [$canv create text $xl $y1 -anchor w -text $tag -fill $fgcolor \
6462
+ set t [$canv create text $xl $y1 -anchor w -text $tag -fill $headfgcolor \
6422
6463
-font $font -tags [list tag.$id text]]
6423
6464
if {$ntags >= 0} {
6424
6465
$canv bind $t <1> [list showtag $tag_quoted 1]
@@ -6799,6 +6840,7 @@ proc appendwithlinks {text tags} {
6799
6840
6800
6841
proc setlink {id lk} {
6801
6842
global curview ctext pendinglinks
6843
+ global linkfgcolor
6802
6844
6803
6845
if {[string range $id 0 1] eq " -g" } {
6804
6846
set id [string range $id 2 end]
@@ -6816,7 +6858,7 @@ proc setlink {id lk} {
6816
6858
set known [commitinview $id $curview ]
6817
6859
}
6818
6860
if {$known } {
6819
- $ctext tag conf $lk -foreground blue -underline 1
6861
+ $ctext tag conf $lk -foreground $linkfgcolor -underline 1
6820
6862
$ctext tag bind $lk <1> [list selbyid $id ]
6821
6863
$ctext tag bind $lk <Enter> {linkcursor %W 1}
6822
6864
$ctext tag bind $lk <Leave> {linkcursor %W -1}
@@ -8459,6 +8501,8 @@ proc lineleave {id} {
8459
8501
proc linehover {} {
8460
8502
global hoverx hovery hoverid hovertimer
8461
8503
global canv linespc lthickness
8504
+ global linehoverbgcolor linehoverfgcolor linehoveroutlinecolor
8505
+
8462
8506
global commitinfo
8463
8507
8464
8508
set text [lindex $commitinfo($hoverid) 0]
@@ -8472,10 +8516,11 @@ proc linehover {} {
8472
8516
set x1 [expr {$x + [font measure mainfont $text ] + 2 * $lthickness }]
8473
8517
set y1 [expr {$y + $linespc + 2 * $lthickness }]
8474
8518
set t [$canv create rectangle $x0 $y0 $x1 $y1 \
8475
- -fill \# ffff80 -outline black -width 1 -tags hover]
8519
+ -fill $linehoverbgcolor -outline $linehoveroutlinecolor \
8520
+ -width 1 -tags hover]
8476
8521
$canv raise $t
8477
8522
set t [$canv create text $x $y -anchor nw -text $text -tags hover \
8478
- -font mainfont]
8523
+ -font mainfont -fill $linehoverfgcolor ]
8479
8524
$canv raise $t
8480
8525
}
8481
8526
@@ -9039,12 +9084,13 @@ proc domktag {} {
9039
9084
proc redrawtags {id} {
9040
9085
global canv linehtag idpos currentid curview cmitlisted markedid
9041
9086
global canvxmax iddrawn circleitem mainheadid circlecolors
9087
+ global mainheadcirclecolor
9042
9088
9043
9089
if {![commitinview $id $curview ]} return
9044
9090
if {![info exists iddrawn($id )]} return
9045
9091
set row [rowofcommit $id ]
9046
9092
if {$id eq $mainheadid } {
9047
- set ofill yellow
9093
+ set ofill $mainheadcirclecolor
9048
9094
} else {
9049
9095
set ofill [lindex $circlecolors $cmitlisted($curview,$id) ]
9050
9096
}
@@ -11728,22 +11774,47 @@ if {[tk windowingsystem] eq "aqua"} {
11728
11774
set colors {green red blue magenta darkgrey brown orange}
11729
11775
if {[tk windowingsystem] eq " win32" } {
11730
11776
set uicolor SystemButtonFace
11777
+ set uifgcolor SystemButtonText
11778
+ set uifgdisabledcolor SystemDisabledText
11731
11779
set bgcolor SystemWindow
11732
- set fgcolor SystemButtonText
11780
+ set fgcolor SystemWindowText
11733
11781
set selectbgcolor SystemHighlight
11734
11782
} else {
11735
11783
set uicolor grey85
11784
+ set uifgcolor black
11785
+ set uifgdisabledcolor " #999"
11736
11786
set bgcolor white
11737
11787
set fgcolor black
11738
11788
set selectbgcolor gray85
11739
11789
}
11740
11790
set diffcolors {red " #00a000" blue}
11741
11791
set diffcontext 3
11792
+ set mergecolors {red blue green purple brown " #009090" magenta " #808000" " #009000" " #ff0080" cyan " #b07070" " #70b0f0" " #70f0b0" " #f0b070" " #ff70b0" }
11742
11793
set ignorespace 0
11743
11794
set worddiff " "
11744
11795
set markbgcolor " #e0e0ff"
11745
11796
11797
+ set headbgcolor green
11798
+ set headfgcolor black
11799
+ set headoutlinecolor black
11800
+ set remotebgcolor #ffddaa
11801
+ set tagbgcolor yellow
11802
+ set tagfgcolor black
11803
+ set tagoutlinecolor black
11804
+ set reflinecolor black
11805
+ set filesepbgcolor #aaaaaa
11806
+ set filesepfgcolor black
11807
+ set linehoverbgcolor #ffff80
11808
+ set linehoverfgcolor black
11809
+ set linehoveroutlinecolor black
11810
+ set mainheadcirclecolor yellow
11811
+ set workingfilescirclecolor red
11812
+ set indexcirclecolor green
11746
11813
set circlecolors {white blue gray blue blue}
11814
+ set linkfgcolor blue
11815
+ set circleoutlinecolor $fgcolor
11816
+ set foundbgcolor yellow
11817
+ set currentsearchhitbgcolor orange
11747
11818
11748
11819
# button for popping up context menus
11749
11820
if {[tk windowingsystem] eq " aqua" } {
0 commit comments