@matheusbsbs / matheus-bagliano / commits / 48b8d2b379
Fork 0

git-gui: Allow users to set font weights to bold

Previously we allowed users to tweak their font weight to be bold by setting it manually in their ~/.gitconfig prior to starting git-gui. This was broken in ae0754ac9a24afa2693246222fc078fe9c133b3a when Simon set the font weight to normal by default, overridding whatever we found from the ~/.gitconfig file. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Shawn O. Pearce committed Nov 1, 2007 at 00:31 UTC 48b8d2b3792339d4dbd37802db8ec797361dd1fe
1 file changed +8 -1
git-gui.sh
+8 -1
@@ -551,8 +551,15 @@ proc apply_config {} {
551 set name [lindex $option 0]
552 set font [lindex $option 1]
553 if {[catch {
554 + set need_weight 1
555 foreach {cn cv} $repo_config(gui.$name) {
555 - font configure $font $cn $cv -weight normal
556 + if {$cn eq {-weight}} {
557 + set need_weight 0
558 + }
559 + font configure $font $cn $cv
560 + }
561 + if {$need_weight} {
562 + font configure $font -weight normal
563 }
564 } err]} {
565 error_popup [strcat [mc "Invalid font specified in %s:" "gui.$name"] "\n\n$err"]