* gitview: Use monospace font to draw the branch and tag name
@ 2006-02-22 16:06 Aneesh Kumar K.V
2006-02-24 11:17 ` Junio C Hamano
0 siblings, 1 reply; 5+ messages in thread
From: Aneesh Kumar K.V @ 2006-02-22 16:06 UTC (permalink / raw)
To: git, Junio C Hamano, aneesh.kumar
[-- 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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: gitview: Use monospace font to draw the branch and tag name
2006-02-22 16:06 gitview: Use monospace font to draw the branch and tag name Aneesh Kumar K.V
@ 2006-02-24 11:17 ` Junio C Hamano
2006-02-24 16:29 ` Aneesh Kumar
0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2006-02-24 11:17 UTC (permalink / raw)
To: Aneesh Kumar K.V; +Cc: git
"Aneesh Kumar K.V" <aneesh.kumar@gmail.com> writes:
> This patch address the below:
> Use monospace font to draw branch and tag name
> set the font size to 13.
I have an impression that hardcoding UI policy like this is
generally frowned upon.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gitview: Use monospace font to draw the branch and tag name
2006-02-24 11:17 ` Junio C Hamano
@ 2006-02-24 16:29 ` Aneesh Kumar
2006-02-25 6:05 ` Junio C Hamano
0 siblings, 1 reply; 5+ messages in thread
From: Aneesh Kumar @ 2006-02-24 16:29 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
On 2/24/06, Junio C Hamano <junkio@cox.net> wrote:
> "Aneesh Kumar K.V" <aneesh.kumar@gmail.com> writes:
>
> > This patch address the below:
> > Use monospace font to draw branch and tag name
> > set the font size to 13.
>
> I have an impression that hardcoding UI policy like this is
> generally frowned upon.
But with that changes branch and the tag name looks neat.
May be down the line we can add a prefernce tag that will allow the
user to change all these hardcoded values.
-aneesh
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gitview: Use monospace font to draw the branch and tag name
2006-02-24 16:29 ` Aneesh Kumar
@ 2006-02-25 6:05 ` Junio C Hamano
2006-02-25 7:00 ` Aneesh Kumar
0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2006-02-25 6:05 UTC (permalink / raw)
To: Aneesh Kumar; +Cc: git
"Aneesh Kumar" <aneesh.kumar@gmail.com> writes:
> On 2/24/06, Junio C Hamano <junkio@cox.net> wrote:
>> "Aneesh Kumar K.V" <aneesh.kumar@gmail.com> writes:
>>
>> > This patch address the below:
>> > Use monospace font to draw branch and tag name
>> > set the font size to 13.
>>
>> I have an impression that hardcoding UI policy like this is
>> generally frowned upon.
>
> But with that changes branch and the tag name looks neat.
The point being that it only looks neat on your display, with
its size and resolution, and to your eye.
People have different tastes and equipments. One thing I really
liked gitk (I do not know if gitview does this as well -- if so
I am happy) is I can do - and + to change the text size
depending on what display I am working on.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gitview: Use monospace font to draw the branch and tag name
2006-02-25 6:05 ` Junio C Hamano
@ 2006-02-25 7:00 ` Aneesh Kumar
0 siblings, 0 replies; 5+ messages in thread
From: Aneesh Kumar @ 2006-02-25 7:00 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
On 2/25/06, Junio C Hamano <junkio@cox.net> wrote:
>
> >> I have an impression that hardcoding UI policy like this is
> >> generally frowned upon.
> >
> > But with that changes branch and the tag name looks neat.
>
> The point being that it only looks neat on your display, with
> its size and resolution, and to your eye.
>
> People have different tastes and equipments. One thing I really
> liked gitk (I do not know if gitview does this as well -- if so
> I am happy) is I can do - and + to change the text size
> depending on what display I am working on.
>
>
Point taken. Right now gitview doesn't support + and - key binding. I
will try to add that. For the time being can you can drop my font and
font size related changes and apply rest of the patches.
-aneesh
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-02-25 7:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-22 16:06 gitview: Use monospace font to draw the branch and tag name Aneesh Kumar K.V
2006-02-24 11:17 ` 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
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).