Skip to content

Commit b9b142f

Browse files
Mark Hillspaulusmack
authored andcommitted
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 <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
1 parent 207ad7b commit b9b142f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

gitk

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1877,7 +1877,8 @@ proc setoptions {} {
18771877
option add *Menubutton.font uifont startupFile
18781878
option add *Label.font uifont startupFile
18791879
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
18811882
option add *Labelframe.font uifont startupFile
18821883
option add *Spinbox.font textfont startupFile
18831884
option add *Listbox.font mainfont startupFile
@@ -2176,7 +2177,7 @@ proc makewindow {} {
21762177
set findstring {}
21772178
set fstring .tf.lbar.findstring
21782179
lappend entries $fstring
2179-
${NS}::entry $fstring -width 30 -font textfont -textvariable findstring
2180+
${NS}::entry $fstring -width 30 -textvariable findstring
21802181
trace add variable findstring write find_change
21812182
set findtype [mc "Exact"]
21822183
set findtypemenu [makedroplist .tf.lbar.findtype \
@@ -2219,7 +2220,7 @@ proc makewindow {} {
22192220
pack .bleft.top.search -side left -padx 5
22202221
set sstring .bleft.top.sstring
22212222
set searchstring ""
2222-
${NS}::entry $sstring -width 20 -font textfont -textvariable searchstring
2223+
${NS}::entry $sstring -width 20 -textvariable searchstring
22232224
lappend entries $sstring
22242225
trace add variable searchstring write incrsearch
22252226
pack $sstring -side left -expand 1 -fill x
@@ -4042,7 +4043,7 @@ proc vieweditor {top n title} {
40424043
} elseif {$type eq "path"} {
40434044
${NS}::label $top.l -text $title
40444045
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
40464047
if {[info exists viewfiles($n)]} {
40474048
foreach f $viewfiles($n) {
40484049
$top.t insert end $f

0 commit comments

Comments
 (0)