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 <spearce@spearce.org>
Shawn O. Pearce committed
Jun 2, 2007 at 17:15 UTC
debcd0fd02bda82e3c81e6739bcb26135ac00b85
3 files changed
+12
-1
git-gui.sh
+5
@@ -1024,6 +1024,7 @@ proc incr_font_size {font {amt 1}} {
1024
incr sz $amt
1025
font configure $font -size $sz
1026
font configure ${font}bold -size $sz
1027
+ font configure ${font}italic -size $sz
1028
}
1029
1030
######################################################################
@@ -1216,8 +1217,10 @@ catch {
1217
destroy .dummy
1218
}
1219
1220
+font create font_uiitalic
1221
font create font_uibold
1222
font create font_diffbold
1223
+font create font_diffitalic
1224
1225
foreach class {Button Checkbutton Entry Label
1226
Labelframe Listbox Menu Message
@@ -1249,8 +1252,10 @@ proc apply_config {} {
1252
}
1253
foreach {cn cv} [font configure $font] {
1254
font configure ${font}bold $cn $cv
1255
+ font configure ${font}italic $cn $cv
1256
}
1257
font configure ${font}bold -weight bold
1258
+ font configure ${font}italic -slant italic
1259
}
1260
}
1261
lib/blame.tcl
+4
-1
@@ -194,6 +194,9 @@ constructor new {i_commit i_path} {
194
-xscrollcommand [list $w.file_pane.cm.sbx set] \
195
-yscrollcommand [list $w.file_pane.cm.sby set] \
196
-font font_diff
197
+ $w_cviewer tag conf still_loading \
198
+ -font font_uiitalic \
199
+ -justify center
200
$w_cviewer tag conf header_key \
201
-tabs {3c} \
202
-background $active_color \
@@ -624,7 +627,7 @@ method _showcommit {lno} {
627
set dat [lindex $amov_data $lno]
628
if {$dat eq {}} {
629
set cmit {}
627
- $w_cviewer insert end "Loading annotation..."
630
+ $w_cviewer insert end "Loading annotation..." still_loading
631
} else {
632
set cmit [lindex $dat 0]
633
set file [lindex $dat 1]
lib/option.tcl
+3
@@ -15,6 +15,9 @@ proc save_config {} {
15
font configure ${font}bold \
16
-family $global_config_new(gui.$font^^family) \
17
-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)
21
set global_config_new(gui.$name) [font configure $font]
22
unset global_config_new(gui.$font^^family)
23
unset global_config_new(gui.$font^^size)