From: "Aneesh Kumar K.V" <aneesh.kumar@gmail.com>
To: git@vger.kernel.org, Junio C Hamano <junkio@cox.net>,
aneesh.kumar@gmail.com
Subject: gitview: Use monospace font to draw the branch and tag name
Date: Wed, 22 Feb 2006 21:36:10 +0530 [thread overview]
Message-ID: <43FC8BF2.60205@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2: 0001-gitview-Use-monospace-font-to-draw-the-branch-and-tag-name.txt --]
[-- Type: text/plain, Size: 1527 bytes --]
This patch address the below:
Use monospace font to draw branch and tag name
set the font size to 13.
Make the graph column resizable. This helps to accommodate large tag names
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com>
---
contrib/gitview/gitview | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
725c7d29cbe4efd0a7f7d9f218dc12e36f5920de
diff --git a/contrib/gitview/gitview b/contrib/gitview/gitview
index 5862fcc..0e52c78 100755
--- a/contrib/gitview/gitview
+++ b/contrib/gitview/gitview
@@ -174,9 +174,9 @@ class CellRendererGraph(gtk.GenericCellR
names_len = 0
if (len(names) != 0):
for item in names:
- names_len += len(item)/3
+ names_len += len(item)
- width = box_size * (cols + 1 + names_len )
+ width = box_size * (cols + 1 ) + names_len
height = box_size
# FIXME I have no idea how to use cell_area properly
@@ -258,6 +258,8 @@ class CellRendererGraph(gtk.GenericCellR
for item in names:
name = name + item + " "
+ ctx.select_font_face("Monospace")
+ ctx.set_font_size(13)
ctx.text_path(name)
self.set_colour(ctx, colour, 0.0, 0.5)
@@ -537,8 +539,8 @@ class GitView:
cell = CellRendererGraph()
column = gtk.TreeViewColumn()
- column.set_resizable(False)
- column.pack_start(cell, expand=False)
+ column.set_resizable(True)
+ column.pack_start(cell, expand=True)
column.add_attribute(cell, "node", 1)
column.add_attribute(cell, "in-lines", 2)
column.add_attribute(cell, "out-lines", 3)
--
1.2.0-dirty
next reply other threads:[~2006-02-22 16:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-22 16:06 Aneesh Kumar K.V [this message]
2006-02-24 11:17 ` gitview: Use monospace font to draw the branch and tag name Junio C Hamano
2006-02-24 16:29 ` Aneesh Kumar
2006-02-25 6:05 ` Junio C Hamano
2006-02-25 7:00 ` Aneesh Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43FC8BF2.60205@gmail.com \
--to=aneesh.kumar@gmail.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).