{"thread":{"id":"3772","subject":"[PATCH] Provide configurable UI font for gitk","startedAt":"2006-04-02T09:23:34Z","lastAt":"2006-04-02T19:06:47Z","messageCount":3,"participants":["Keith Packard","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"18213","messageId":"1143969814.2303.71.camel@neko.keithp.com","threadId":"3772","inReplyTo":null,"subject":"[PATCH] Provide configurable UI font for gitk","fromName":"Keith Packard","fromEmail":"keithp@keithp.com","sentAt":"2006-04-02T09:23:34Z","receivedAt":"2006-04-02T09:23:34Z","isPatch":true,"sender":{"key":"keithp@keithp.com","avatar":"https://gravatar.com/avatar/fa1f479cdd51322fe86215c955a81d296bbf66a1fe625f8a12d87a8ec7faf648?d=mp&s=160"},"body":"This makes the font used in the UI elements of gitk configurable in the\nsame way the other fonts are. The default fonts used in the Xft build of\ntk8.5 are particularily horrific, making this change more important\nthere.\n\nSigned-off-by: Keith Packard <keithp@neko.keithp.com>\n\n\n---\n\n gitk |   23 +++++++++++++++++------\n 1 files changed, 17 insertions(+), 6 deletions(-)\n\n0ec97bb373389b5a55b0579168679b59bede1868\ndiff --git a/gitk b/gitk\nindex 03cd475..6319709 100755\n--- a/gitk\n+++ b/gitk\n@@ -337,7 +337,7 @@ proc error_popup msg {\n }\n \n proc makewindow {rargs} {\n-    global canv canv2 canv3 linespc charspc ctext cflist textfont\n+    global canv canv2 canv3 linespc charspc ctext cflist textfont\nmainfont uifont\n     global findtype findtypemenu findloc findstring fstring geometry\n     global entries sha1entry sha1string sha1but\n     global maincursor textcursor curtextcursor\n@@ -345,16 +345,20 @@ proc makewindow {rargs} {\n \n     menu .bar\n     .bar add cascade -label \"File\" -menu .bar.file\n+    .bar configure -font $uifont\n     menu .bar.file\n     .bar.file add command -label \"Update\" -command [list updatecommits\n$rargs]\n     .bar.file add command -label \"Reread references\" -command\nrereadrefs\n     .bar.file add command -label \"Quit\" -command doquit\n+    .bar.file configure -font $uifont\n     menu .bar.edit\n     .bar add cascade -label \"Edit\" -menu .bar.edit\n     .bar.edit add command -label \"Preferences\" -command doprefs\n+    .bar.edit configure -font $uifont\n     menu .bar.help\n     .bar add cascade -label \"Help\" -menu .bar.help\n     .bar.help add command -label \"About gitk\" -command about\n+    .bar.help configure -font $uifont\n     . configure -menu .bar\n \n     if {![info exists geometry(canv1)]} {\n@@ -401,7 +405,7 @@ proc makewindow {rargs} {\n     set entries $sha1entry\n     set sha1but .ctop.top.bar.sha1label\n     button $sha1but -text \"SHA1 ID: \" -state disabled -relief flat \\\n-\t-command gotocommit -width 8\n+\t-command gotocommit -width 8 -font $uifont\n     $sha1but conf -disabledforeground [$sha1but cget -foreground]\n     pack .ctop.top.bar.sha1label -side left\n     entry $sha1entry -width 40 -font $textfont -textvariable sha1string\n@@ -431,19 +435,24 @@ proc makewindow {rargs} {\n \t-state disabled -width 26\n     pack .ctop.top.bar.rightbut -side left -fill y\n \n-    button .ctop.top.bar.findbut -text \"Find\" -command dofind\n+    button .ctop.top.bar.findbut -text \"Find\" -command dofind -font\n$uifont\n     pack .ctop.top.bar.findbut -side left\n     set findstring {}\n     set fstring .ctop.top.bar.findstring\n     lappend entries $fstring\n-    entry $fstring -width 30 -font $textfont -textvariable findstring\n+    entry $fstring -width 30 -font $textfont -textvariable findstring\n-font $textfont\n     pack $fstring -side left -expand 1 -fill x\n     set findtype Exact\n     set findtypemenu [tk_optionMenu .ctop.top.bar.findtype \\\n \t\t\t  findtype Exact IgnCase Regexp]\n+    .ctop.top.bar.findtype configure -font $uifont\n+    .ctop.top.bar.findtype.menu configure -font $uifont\n     set findloc \"All fields\"\n     tk_optionMenu .ctop.top.bar.findloc findloc \"All fields\" Headline \\\n \tComments Author Committer Files Pickaxe\n+    .ctop.top.bar.findloc configure -font $uifont\n+    .ctop.top.bar.findloc.menu configure -font $uifont\n+\t\n     pack .ctop.top.bar.findloc -side right\n     pack .ctop.top.bar.findtype -side right\n     # for making sure type==Exact whenever loc==Pickaxe\n@@ -490,7 +499,7 @@ proc makewindow {rargs} {\n     frame .ctop.cdet.right\n     set cflist .ctop.cdet.right.cfiles\n     listbox $cflist -bg white -selectmode extended -width\n$geometry(cflistw) \\\n-\t-yscrollcommand \".ctop.cdet.right.sb set\"\n+\t-yscrollcommand \".ctop.cdet.right.sb set\" -font $mainfont\n     scrollbar .ctop.cdet.right.sb -command \"$cflist yview\"\n     pack .ctop.cdet.right.sb -side right -fill y\n     pack $cflist -side left -fill both -expand 1\n@@ -590,7 +599,7 @@ proc click {w} {\n }\n \n proc savestuff {w} {\n-    global canv canv2 canv3 ctext cflist mainfont textfont\n+    global canv canv2 canv3 ctext cflist mainfont textfont uifont\n     global stuffsaved findmergefiles maxgraphpct\n     global maxwidth\n \n@@ -600,6 +609,7 @@ proc savestuff {w} {\n \tset f [open \"~/.gitk-new\" w]\n \tputs $f [list set mainfont $mainfont]\n \tputs $f [list set textfont $textfont]\n+\tputs $f [list set uifont $uifont]\n \tputs $f [list set findmergefiles $findmergefiles]\n \tputs $f [list set maxgraphpct $maxgraphpct]\n \tputs $f [list set maxwidth $maxwidth]\n@@ -3738,6 +3748,7 @@ if {$tclencoding == {}} {\n \n set mainfont {Helvetica 9}\n set textfont {Courier 9}\n+set uifont {Helvetica 9 bold}\n set findmergefiles 0\n set maxgraphpct 50\n set maxwidth 16\n-- \n1.3.0.rc1.g9590\n\n\n-- \nkeith.packard@intel.com\n"},{"id":"18216","messageId":"7vodzkkzxr.fsf@assigned-by-dhcp.cox.net","threadId":"3772","inReplyTo":"1143969814.2303.71.camel@neko.keithp.com","subject":"Re: [PATCH] Provide configurable UI font for gitk","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-04-02T10:57:20Z","receivedAt":"2006-04-02T10:57:20Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Keith Packard <keithp@keithp.com> writes:\n\n> This makes the font used in the UI elements of gitk configurable in the\n> same way the other fonts are. The default fonts used in the Xft build of\n> tk8.5 are particularily horrific, making this change more important\n> there.\n>\n> Signed-off-by: Keith Packard <keithp@neko.keithp.com>\n\nThanks for the patch.  I haven't run it, but a quick eyeballing\nsuggests what you did is sane.  However,..\n\n>  proc makewindow {rargs} {\n> -    global canv canv2 canv3 linespc charspc ctext cflist textfont\n> +    global canv canv2 canv3 linespc charspc ctext cflist textfont\n> mainfont uifont\n\nYour MUA seems to be line-wrapping the patch here and there...\n\n> @@ -345,16 +345,20 @@ proc makewindow {rargs} {\n>  \n>      menu .bar\n>      .bar add cascade -label \"File\" -menu .bar.file\n> +    .bar configure -font $uifont\n>      menu .bar.file\n>      .bar.file add command -label \"Update\" -command [list updatecommits\n> $rargs]\n>      .bar.file add command -label \"Reread references\" -command\n> rereadrefs\n>...\n\nso the patch does not apply X-<.\n\nAlso, I prefer changes to gitk to be fed via Paul Mackerras\ntree.  If you send changes to gitk to me, I will forward patches\nwith my Acked-by: to him and wait for him to bounce the change\nback to me through his tree, so it is not a big deal for me, and\nthe changes will _not_ be lost anyway, but I'd still appreciate\ngitk patches to be sent to Paul first if possible.\n"},{"id":"18227","messageId":"1144004807.2303.76.camel@neko.keithp.com","threadId":"3772","inReplyTo":"7vodzkkzxr.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Provide configurable UI font for gitk","fromName":"Keith Packard","fromEmail":"keithp@keithp.com","sentAt":"2006-04-02T19:06:47Z","receivedAt":"2006-04-02T19:06:47Z","isPatch":true,"sender":{"key":"keithp@keithp.com","avatar":"https://gravatar.com/avatar/fa1f479cdd51322fe86215c955a81d296bbf66a1fe625f8a12d87a8ec7faf648?d=mp&s=160"},"body":"On Sun, 2006-04-02 at 03:57 -0700, Junio C Hamano wrote:\n\n> Your MUA seems to be line-wrapping the patch here and there...\n\nSigh. I'll resend it to Paul.\n\n-- \nkeith.packard@intel.com\n"}]}