[PATCH] Teach gitk to use the user-defined UI font everywhere.
Some parts of gitk were not respecting the default GUI font. Most of them were catched and fixed. Signed-off-by: Eygene Ryabinkin <rea-git@codelabs.ru> Signed-off-by: Paul Mackerras <paulus@samba.org>
Eygene Ryabinkin committed
Mar 27, 2007 at 14:36 UTC
d59c4b6fb731e5fddb458106b2e18eed1087c507
1 file changed
+23
-6
gitk
+23
-6
@@ -648,8 +648,10 @@ proc makewindow {} {
648
frame .bright.mode
649
radiobutton .bright.mode.patch -text "Patch" \
650
-command reselectline -variable cmitmode -value "patch"
651
+ .bright.mode.patch configure -font $uifont
652
radiobutton .bright.mode.tree -text "Tree" \
653
-command reselectline -variable cmitmode -value "tree"
654
+ .bright.mode.tree configure -font $uifont
655
grid .bright.mode.patch .bright.mode.tree -sticky ew
656
pack .bright.mode -side top -fill x
657
set cflist .bright.cfiles
@@ -922,6 +924,7 @@ proc bindall {event action} {
924
}
925
926
proc about {} {
927
+ global uifont
928
set w .about
929
if {[winfo exists $w]} {
930
raise $w
@@ -937,11 +940,14 @@ Copyright
940
Use and redistribute under the terms of the GNU General Public License} \
941
-justify center -aspect 400
942
pack $w.m -side top -fill x -padx 20 -pady 20
943
+ $w.m configure -font $uifont
944
button $w.ok -text Close -command "destroy $w"
945
pack $w.ok -side bottom
946
+ $w.ok configure -font $uifont
947
}
948
949
proc keys {} {
950
+ global uifont
951
set w .keys
952
if {[winfo exists $w]} {
953
raise $w
@@ -990,8 +996,10 @@ f Scroll diff view to next file
996
} \
997
-justify left -bg white -border 2 -relief sunken
998
pack $w.m -side top -fill both
999
+ $w.m configure -font $uifont
1000
button $w.ok -text Close -command "destroy $w"
1001
pack $w.ok -side bottom
1002
+ $w.ok configure -font $uifont
1003
}
1004
1005
# Procedures for manipulating the file list window at the
@@ -1457,20 +1465,21 @@ proc vieweditor {top n title} {
1465
toplevel $top
1466
wm title $top $title
1467
label $top.nl -text "Name" -font $uifont
1460
- entry $top.name -width 20 -textvariable newviewname($n)
1468
+ entry $top.name -width 20 -textvariable newviewname($n) -font $uifont
1469
grid $top.nl $top.name -sticky w -pady 5
1462
- checkbutton $top.perm -text "Remember this view" -variable newviewperm($n)
1470
+ checkbutton $top.perm -text "Remember this view" -variable newviewperm($n) \
1471
+ -font $uifont
1472
grid $top.perm - -pady 5 -sticky w
1473
message $top.al -aspect 1000 -font $uifont \
1474
-text "Commits to include (arguments to git rev-list):"
1475
grid $top.al - -sticky w -pady 5
1476
entry $top.args -width 50 -textvariable newviewargs($n) \
1468
- -background white
1477
+ -background white -font $uifont
1478
grid $top.args - -sticky ew -padx 5
1479
message $top.l -aspect 1000 -font $uifont \
1480
-text "Enter files and directories to include, one per line:"
1481
grid $top.l - -sticky w
1473
- text $top.t -width 40 -height 10 -background white
1482
+ text $top.t -width 40 -height 10 -background white -font $uifont
1483
if {[info exists viewfiles($n)]} {
1484
foreach f $viewfiles($n) {
1485
$top.t insert end $f
@@ -1481,8 +1490,10 @@ proc vieweditor {top n title} {
1490
}
1491
grid $top.t - -sticky ew -padx 5
1492
frame $top.buts
1484
- button $top.buts.ok -text "OK" -command [list newviewok $top $n]
1485
- button $top.buts.can -text "Cancel" -command [list destroy $top]
1493
+ button $top.buts.ok -text "OK" -command [list newviewok $top $n] \
1494
+ -font $uifont
1495
+ button $top.buts.can -text "Cancel" -command [list destroy $top] \
1496
+ -font $uifont
1497
grid $top.buts.ok $top.buts.can
1498
grid columnconfigure $top.buts 0 -weight 1 -uniform a
1499
grid columnconfigure $top.buts 1 -weight 1 -uniform a
@@ -5813,6 +5824,7 @@ proc doprefs {} {
5824
global maxwidth maxgraphpct diffopts
5825
global oldprefs prefstop showneartags
5826
global bgcolor fgcolor ctext diffcolors
5827
+ global uifont
5828
5829
set top .gitkprefs
5830
set prefstop $top
@@ -5826,6 +5838,7 @@ proc doprefs {} {
5838
toplevel $top
5839
wm title $top "Gitk preferences"
5840
label $top.ldisp -text "Commit list display options"
5841
+ $top.ldisp configure -font $uifont
5842
grid $top.ldisp - -sticky w -pady 10
5843
label $top.spacer -text " "
5844
label $top.maxwidthl -text "Maximum graph width (lines)" \
@@ -5838,6 +5851,7 @@ proc doprefs {} {
5851
grid x $top.maxpctl $top.maxpct -sticky w
5852
5853
label $top.ddisp -text "Diff display options"
5854
+ $top.ddisp configure -font $uifont
5855
grid $top.ddisp - -sticky w -pady 10
5856
label $top.diffoptl -text "Options for diff program" \
5857
-font optionfont
@@ -5850,6 +5864,7 @@ proc doprefs {} {
5864
grid x $top.ntag -sticky w
5865
5866
label $top.cdisp -text "Colors: press to choose"
5867
+ $top.cdisp configure -font $uifont
5868
grid $top.cdisp - -sticky w -pady 10
5869
label $top.bg -padx 40 -relief sunk -background $bgcolor
5870
button $top.bgbut -text "Background" -font optionfont \
@@ -5878,7 +5893,9 @@ proc doprefs {} {
5893
5894
frame $top.buts
5895
button $top.buts.ok -text "OK" -command prefsok
5896
+ $top.buts.ok configure -font $uifont
5897
button $top.buts.can -text "Cancel" -command prefscan
5898
+ $top.buts.can configure -font $uifont
5899
grid $top.buts.ok $top.buts.can
5900
grid columnconfigure $top.buts 0 -weight 1 -uniform a
5901
grid columnconfigure $top.buts 1 -weight 1 -uniform a