{"thread":{"id":"3436","subject":"gitview: Use monospace font to draw the branch and tag name","startedAt":"2006-02-22T16:06:10Z","lastAt":"2006-02-25T07:00:06Z","messageCount":5,"participants":["Aneesh Kumar K.V","Junio C Hamano","Aneesh Kumar"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"16571","messageId":"43FC8BF2.60205@gmail.com","threadId":"3436","inReplyTo":null,"subject":"gitview: Use monospace font to draw the branch and tag name","fromName":"Aneesh Kumar K.V","fromEmail":"aneesh.kumar@gmail.com","sentAt":"2006-02-22T16:06:10Z","receivedAt":"2006-02-22T16:06:10Z","isPatch":false,"sender":{"key":"aneesh.kumar@gmail.com","avatar":"https://gravatar.com/avatar/0621fc0b2f14ead1e9024382f16053a808c148596da30c1b92572fa075621f68?d=mp&s=160"},"body":"\n\n\nThis patch address the below:\nUse monospace font to draw branch and tag name\nset the font size to 13.\nMake the graph column resizable. This helps to accommodate large tag names\n\nSigned-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com>\n\n---\n\n contrib/gitview/gitview |   10 ++++++----\n 1 files changed, 6 insertions(+), 4 deletions(-)\n\n725c7d29cbe4efd0a7f7d9f218dc12e36f5920de\ndiff --git a/contrib/gitview/gitview b/contrib/gitview/gitview\nindex 5862fcc..0e52c78 100755\n--- a/contrib/gitview/gitview\n+++ b/contrib/gitview/gitview\n@@ -174,9 +174,9 @@ class CellRendererGraph(gtk.GenericCellR\n \t\tnames_len = 0\n \t\tif (len(names) != 0):\n \t\t\tfor item in names:\n-\t\t\t\tnames_len += len(item)/3\n+\t\t\t\tnames_len += len(item)\n \n-\t\twidth = box_size * (cols + 1 + names_len )\n+\t\twidth = box_size * (cols + 1 ) + names_len \n \t\theight = box_size\n \n \t\t# FIXME I have no idea how to use cell_area properly\n@@ -258,6 +258,8 @@ class CellRendererGraph(gtk.GenericCellR\n \t\t\tfor item in names:\n \t\t\t\tname = name + item + \" \"\n \n+\t\t\tctx.select_font_face(\"Monospace\")\n+\t\t\tctx.set_font_size(13)\n \t\t\tctx.text_path(name)\n \n \t\tself.set_colour(ctx, colour, 0.0, 0.5)\n@@ -537,8 +539,8 @@ class GitView:\n \n \t\tcell = CellRendererGraph()\n \t\tcolumn = gtk.TreeViewColumn()\n-\t\tcolumn.set_resizable(False)\n-\t\tcolumn.pack_start(cell, expand=False)\n+\t\tcolumn.set_resizable(True)\n+\t\tcolumn.pack_start(cell, expand=True)\n \t\tcolumn.add_attribute(cell, \"node\", 1)\n \t\tcolumn.add_attribute(cell, \"in-lines\", 2)\n \t\tcolumn.add_attribute(cell, \"out-lines\", 3)\n-- \n1.2.0-dirty\n\n"},{"id":"16663","messageId":"7vr75tc8gj.fsf@assigned-by-dhcp.cox.net","threadId":"3436","inReplyTo":"43FC8BF2.60205@gmail.com","subject":"Re: gitview: Use monospace font to draw the branch and tag name","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-02-24T11:17:00Z","receivedAt":"2006-02-24T11:17:00Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Aneesh Kumar K.V\" <aneesh.kumar@gmail.com> writes:\n\n> This patch address the below:\n> Use monospace font to draw branch and tag name\n> set the font size to 13.\n\nI have an impression that hardcoding UI policy like this is\ngenerally frowned upon.\n"},{"id":"16683","messageId":"cc723f590602240829y3ebffaf9mdd7de0cd2a9051e@mail.gmail.com","threadId":"3436","inReplyTo":"7vr75tc8gj.fsf@assigned-by-dhcp.cox.net","subject":"Re: gitview: Use monospace font to draw the branch and tag name","fromName":"Aneesh Kumar","fromEmail":"aneesh.kumar@gmail.com","sentAt":"2006-02-24T16:29:15Z","receivedAt":"2006-02-24T16:29:15Z","isPatch":false,"sender":{"key":"aneesh.kumar@gmail.com","avatar":"https://gravatar.com/avatar/0621fc0b2f14ead1e9024382f16053a808c148596da30c1b92572fa075621f68?d=mp&s=160"},"body":"On 2/24/06, Junio C Hamano <junkio@cox.net> wrote:\n> \"Aneesh Kumar K.V\" <aneesh.kumar@gmail.com> writes:\n>\n> > This patch address the below:\n> > Use monospace font to draw branch and tag name\n> > set the font size to 13.\n>\n> I have an impression that hardcoding UI policy like this is\n> generally frowned upon.\n\nBut with that changes branch and the tag name looks neat.\n\nMay be down the  line we can add a prefernce tag that will allow the\nuser to change all these hardcoded values.\n\n-aneesh\n"},{"id":"16727","messageId":"7vzmkg6kj7.fsf@assigned-by-dhcp.cox.net","threadId":"3436","inReplyTo":"cc723f590602240829y3ebffaf9mdd7de0cd2a9051e@mail.gmail.com","subject":"Re: gitview: Use monospace font to draw the branch and tag name","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-02-25T06:05:00Z","receivedAt":"2006-02-25T06:05:00Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Aneesh Kumar\" <aneesh.kumar@gmail.com> writes:\n\n> On 2/24/06, Junio C Hamano <junkio@cox.net> wrote:\n>> \"Aneesh Kumar K.V\" <aneesh.kumar@gmail.com> writes:\n>>\n>> > This patch address the below:\n>> > Use monospace font to draw branch and tag name\n>> > set the font size to 13.\n>>\n>> I have an impression that hardcoding UI policy like this is\n>> generally frowned upon.\n>\n> But with that changes branch and the tag name looks neat.\n\nThe point being that it only looks neat on your display, with\nits size and resolution, and to your eye.\n\nPeople have different tastes and equipments.  One thing I really\nliked gitk (I do not know if gitview does this as well -- if so\nI am happy) is I can do - and + to change the text size\ndepending on what display I am working on.\n"},{"id":"16729","messageId":"cc723f590602242300h65e6a9d6k87148d2124a71907@mail.gmail.com","threadId":"3436","inReplyTo":"7vzmkg6kj7.fsf@assigned-by-dhcp.cox.net","subject":"Re: gitview: Use monospace font to draw the branch and tag name","fromName":"Aneesh Kumar","fromEmail":"aneesh.kumar@gmail.com","sentAt":"2006-02-25T07:00:06Z","receivedAt":"2006-02-25T07:00:06Z","isPatch":false,"sender":{"key":"aneesh.kumar@gmail.com","avatar":"https://gravatar.com/avatar/0621fc0b2f14ead1e9024382f16053a808c148596da30c1b92572fa075621f68?d=mp&s=160"},"body":"On 2/25/06, Junio C Hamano <junkio@cox.net> wrote:\n>\n> >> I have an impression that hardcoding UI policy like this is\n> >> generally frowned upon.\n> >\n> > But with that changes branch and the tag name looks neat.\n>\n> The point being that it only looks neat on your display, with\n> its size and resolution, and to your eye.\n>\n> People have different tastes and equipments.  One thing I really\n> liked gitk (I do not know if gitview does this as well -- if so\n> I am happy) is I can do - and + to change the text size\n> depending on what display I am working on.\n>\n>\n\nPoint taken. Right now gitview doesn't support + and - key binding. I\nwill try to add that. For the time being can you can drop my font and\nfont size related  changes and apply rest of the patches.\n\n-aneesh\n"}]}