@matheusbsbs / matheus-bagliano / commits / b9b142ffa2
Fork 0

gitk: Use consistent font for all text input fields

Instead of setting the font for specific widgets, set the font for the widget type. If themed widgets are not available, this is via the X resources. If themed widgets are available, the theme font is used. The exception is the SHA1 ID which is forced to use the fixed-width font, even where themed widgets are used. Signed-off-by: Mark Hills <mark@pogo.org.uk> Signed-off-by: Paul Mackerras <paulus@samba.org>

Mark Hills committed Jan 13, 2010 at 20:40 UTC b9b142ffa218b50dadad091bd660ba801d0ca5d5
1 file changed +5 -4
gitk
+5 -4
@@ -1877,7 +1877,8 @@ proc setoptions {} {
1877 option add *Menubutton.font uifont startupFile
1878 option add *Label.font uifont startupFile
1879 option add *Message.font uifont startupFile
1880 - option add *Entry.font uifont startupFile
1880 + option add *Entry.font textfont startupFile
1881 + option add *Text.font textfont startupFile
1882 option add *Labelframe.font uifont startupFile
1883 option add *Spinbox.font textfont startupFile
1884 option add *Listbox.font mainfont startupFile
@@ -2176,7 +2177,7 @@ proc makewindow {} {
2177 set findstring {}
2178 set fstring .tf.lbar.findstring
2179 lappend entries $fstring
2179 - ${NS}::entry $fstring -width 30 -font textfont -textvariable findstring
2180 + ${NS}::entry $fstring -width 30 -textvariable findstring
2181 trace add variable findstring write find_change
2182 set findtype [mc "Exact"]
2183 set findtypemenu [makedroplist .tf.lbar.findtype \
@@ -2219,7 +2220,7 @@ proc makewindow {} {
2220 pack .bleft.top.search -side left -padx 5
2221 set sstring .bleft.top.sstring
2222 set searchstring ""
2222 - ${NS}::entry $sstring -width 20 -font textfont -textvariable searchstring
2223 + ${NS}::entry $sstring -width 20 -textvariable searchstring
2224 lappend entries $sstring
2225 trace add variable searchstring write incrsearch
2226 pack $sstring -side left -expand 1 -fill x
@@ -4042,7 +4043,7 @@ proc vieweditor {top n title} {
4043 } elseif {$type eq "path"} {
4044 ${NS}::label $top.l -text $title
4045 pack $top.l -in $top -side top -pady [list 3 0] -anchor w -padx 3
4045 - text $top.t -width 40 -height 5 -background $bgcolor -font uifont
4046 + text $top.t -width 40 -height 5 -background $bgcolor
4047 if {[info exists viewfiles($n)]} {
4048 foreach f $viewfiles($n) {
4049 $top.t insert end $f