Skip to content

Commit debcd0f

Browse files
committed
git-gui: Display the "Loading annotation..." message in italic
If the user clicks on a line region that we haven't yet received an annotation for from git-blame we show them "Loading annotation". But I don't want the user to confuse this loading message with a commit whose first line is "Loading annotation" and think we messed up our display somehow. Since we never use italics for anything else, I'm going with the idea that italic slant can be used to show data is missing/elided out at the time being. Signed-off-by: Shawn O. Pearce <[email protected]>
1 parent fc816d7 commit debcd0f

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

git-gui.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,6 +1024,7 @@ proc incr_font_size {font {amt 1}} {
10241024
incr sz $amt
10251025
font configure $font -size $sz
10261026
font configure ${font}bold -size $sz
1027+
font configure ${font}italic -size $sz
10271028
}
10281029

10291030
######################################################################
@@ -1216,8 +1217,10 @@ catch {
12161217
destroy .dummy
12171218
}
12181219

1220+
font create font_uiitalic
12191221
font create font_uibold
12201222
font create font_diffbold
1223+
font create font_diffitalic
12211224

12221225
foreach class {Button Checkbutton Entry Label
12231226
Labelframe Listbox Menu Message
@@ -1249,8 +1252,10 @@ proc apply_config {} {
12491252
}
12501253
foreach {cn cv} [font configure $font] {
12511254
font configure ${font}bold $cn $cv
1255+
font configure ${font}italic $cn $cv
12521256
}
12531257
font configure ${font}bold -weight bold
1258+
font configure ${font}italic -slant italic
12541259
}
12551260
}
12561261

lib/blame.tcl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,9 @@ constructor new {i_commit i_path} {
194194
-xscrollcommand [list $w.file_pane.cm.sbx set] \
195195
-yscrollcommand [list $w.file_pane.cm.sby set] \
196196
-font font_diff
197+
$w_cviewer tag conf still_loading \
198+
-font font_uiitalic \
199+
-justify center
197200
$w_cviewer tag conf header_key \
198201
-tabs {3c} \
199202
-background $active_color \
@@ -624,7 +627,7 @@ method _showcommit {lno} {
624627
set dat [lindex $amov_data $lno]
625628
if {$dat eq {}} {
626629
set cmit {}
627-
$w_cviewer insert end "Loading annotation..."
630+
$w_cviewer insert end "Loading annotation..." still_loading
628631
} else {
629632
set cmit [lindex $dat 0]
630633
set file [lindex $dat 1]

lib/option.tcl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ proc save_config {} {
1515
font configure ${font}bold \
1616
-family $global_config_new(gui.$font^^family) \
1717
-size $global_config_new(gui.$font^^size)
18+
font configure ${font}italic \
19+
-family $global_config_new(gui.$font^^family) \
20+
-size $global_config_new(gui.$font^^size)
1821
set global_config_new(gui.$name) [font configure $font]
1922
unset global_config_new(gui.$font^^family)
2023
unset global_config_new(gui.$font^^size)

0 commit comments

Comments
 (0)