##// END OF EJS Templates
hgk: added colour settings for different colours in diff view
Robert Bauck Hamar -
r7746:59815cef default
parent child Browse files
Show More
@@ -439,7 +439,8 b' proc makewindow {} {'
439 439 global entries sha1entry sha1string sha1but
440 440 global maincursor textcursor curtextcursor
441 441 global rowctxmenu gaudydiff mergemax
442 global hgvdiff bgcolor fgcolor
442 global hgvdiff bgcolor fgcolor diffremcolor diffaddcolor diffmerge1color
443 global diffmerge2color hunksepcolor
443 444
444 445 menu .bar
445 446 .bar add cascade -label "File" -menu .bar.file
@@ -564,11 +565,16 b' proc makewindow {} {'
564 565 $ctext tag conf d0 -back "#ff8080"
565 566 $ctext tag conf d1 -back green
566 567 } else {
567 $ctext tag conf hunksep -fore blue
568 $ctext tag conf d0 -fore red
569 $ctext tag conf d1 -fore "#00a000"
570 $ctext tag conf m0 -fore red
571 $ctext tag conf m1 -fore blue
568 $ctext tag conf hunksep -fore $hunksepcolor
569 $ctext tag conf d0 -fore $diffremcolor
570 $ctext tag conf d1 -fore $diffaddcolor
571
572 # The mX colours seem to be used in merge changesets, where m0
573 # is first parent, m1 is second parent and so on. Git can have
574 # several parents, Hg cannot, so I think the m2..mmax would be
575 # unused.
576 $ctext tag conf m0 -fore $diffmerge1color
577 $ctext tag conf m1 -fore $diffmerge2color
572 578 $ctext tag conf m2 -fore green
573 579 $ctext tag conf m3 -fore purple
574 580 $ctext tag conf m4 -fore brown
@@ -681,6 +687,8 b' proc savestuff {w} {'
681 687 global canv canv2 canv3 ctext cflist mainfont textfont
682 688 global stuffsaved findmergefiles gaudydiff maxgraphpct
683 689 global maxwidth authorcolors curidfont bgcolor fgcolor
690 global diffremcolor diffaddcolor hunksepcolor
691 global diffmerge1color diffmerge2color
684 692
685 693 if {$stuffsaved} return
686 694 if {![winfo viewable .]} return
@@ -726,6 +734,21 b' proc savestuff {w} {'
726 734 puts $f "#"
727 735 puts $f "# The text color used in the diff and file list view"
728 736 puts $f "set fgcolor $fgcolor"
737 puts $f "#"
738 puts $f "# Color to display + lines in diffs"
739 puts $f "set diffaddcolor $diffaddcolor"
740 puts $f "#"
741 puts $f "# Color to display - lines in diffs"
742 puts $f "set diffremcolor $diffremcolor"
743 puts $f "#"
744 puts $f "# Merge diffs: Color to signal lines from first parent"
745 puts $f "set diffmerge1color $diffmerge1color"
746 puts $f "#"
747 puts $f "# Merge diffs: Color to signal lines from second parent"
748 puts $f "set diffmerge2color $diffmerge2color"
749 puts $f "#"
750 puts $f "# Hunkseparator (@@ -lineno,lines +lineno,lines @@) color"
751 puts $f "set hunksepcolor $hunksepcolor"
729 752 close $f
730 753 file rename -force "~/.hgk-new" "~/.hgk"
731 754 }
@@ -3901,6 +3924,11 b' set bgcolor white'
3901 3924 # This color should probably be some system color (provided by tk),
3902 3925 # but as the bgcolor has always been set to white, I choose to ignore
3903 3926 set fgcolor black
3927 set diffaddcolor "#00a000"
3928 set diffremcolor red
3929 set diffmerge1color red
3930 set diffmerge2color blue
3931 set hunksepcolor blue
3904 3932
3905 3933 catch {source ~/.hgk}
3906 3934
General Comments 0
You need to be logged in to leave comments. Login now