Rev 481: Merge white strokes impovements. in file:///data/jelmer/bzr-gtk/trunk/
Jelmer Vernooij
jelmer at samba.org
Thu May 1 22:59:20 BST 2008
At file:///data/jelmer/bzr-gtk/trunk/
------------------------------------------------------------
revno: 481
revision-id: jelmer at samba.org-20080501215910-1la3cz3uyz2cjy1k
parent: jelmer at samba.org-20080501214950-zjs5qxi898ol12eb
parent: daniel.schierbeck at gmail.com-20080402232111-a2psy91ng4m9pvnb
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Thu 2008-05-01 23:59:10 +0200
message:
Merge white strokes impovements.
modified:
branchview/graphcell.py graphcell.py-20051017001313-5b9651e6d3a578bc
------------------------------------------------------------
revno: 450.9.5
revision-id: daniel.schierbeck at gmail.com-20080402232111-a2psy91ng4m9pvnb
parent: daniel.schierbeck at gmail.com-20080402231138-udfjc1oz5a52kssp
committer: Daniel Schierbeck <daniel.schierbeck at gmail.com>
branch nick: graphcell-selected
timestamp: Thu 2008-04-03 01:21:11 +0200
message:
Fixed bug where the broken lines markers were not drawn correctly.
modified:
branchview/graphcell.py graphcell.py-20051017001313-5b9651e6d3a578bc
------------------------------------------------------------
revno: 450.9.4
revision-id: daniel.schierbeck at gmail.com-20080402231138-udfjc1oz5a52kssp
parent: daniel.schierbeck at gmail.com-20080402223913-1elzz7whd76fw08d
committer: Daniel Schierbeck <daniel.schierbeck at gmail.com>
branch nick: graphcell-selected
timestamp: Thu 2008-04-03 01:11:38 +0200
message:
Removed white breaks between joining lines.
modified:
branchview/graphcell.py graphcell.py-20051017001313-5b9651e6d3a578bc
------------------------------------------------------------
revno: 450.9.3
revision-id: daniel.schierbeck at gmail.com-20080402223913-1elzz7whd76fw08d
parent: daniel.schierbeck at gmail.com-20080402222453-4dz37ykwfh5pyojn
committer: Daniel Schierbeck <daniel.schierbeck at gmail.com>
branch nick: graphcell-selected
timestamp: Thu 2008-04-03 00:39:13 +0200
message:
Made the line graph be stroked with white instead of filled.
modified:
branchview/graphcell.py graphcell.py-20051017001313-5b9651e6d3a578bc
------------------------------------------------------------
revno: 450.9.2
revision-id: daniel.schierbeck at gmail.com-20080402222453-4dz37ykwfh5pyojn
parent: daniel.schierbeck at gmail.com-20080401212548-wdo2rhv9z0nvcwjc
parent: daniel.schierbeck at gmail.com-20080402203042-sygle06ro6v9pu2l
committer: Daniel Schierbeck <daniel.schierbeck at gmail.com>
branch nick: graphcell-selected
timestamp: Thu 2008-04-03 00:24:53 +0200
message:
Merged with trunk.
added:
icons/tag-16.png tag16.png-20080402002128-woq3y8g35is6jrv6-1
modified:
AUTHORS AUTHORS-20051017005451-498ad64fcc9771a0
preferences/plugins.py plugins.py-20080328193019-jhdtj2h9foskjijv-1
viz/branchwin.py branchwin.py-20051016222514-15fd120652fcf25c
------------------------------------------------------------
revno: 450.9.1
revision-id: daniel.schierbeck at gmail.com-20080401212548-wdo2rhv9z0nvcwjc
parent: jelmer at samba.org-20080401102012-yinvbwqulfci6x6h
committer: Daniel Schierbeck <daniel.schierbeck at gmail.com>
branch nick: graphcell-selected
timestamp: Tue 2008-04-01 23:25:48 +0200
message:
Made the graph cell renderer draw in white when the row is selected.
modified:
branchview/graphcell.py graphcell.py-20051017001313-5b9651e6d3a578bc
=== modified file 'branchview/graphcell.py'
--- a/branchview/graphcell.py 2008-01-22 22:58:29 +0000
+++ b/branchview/graphcell.py 2008-04-02 23:21:11 +0000
@@ -149,19 +149,18 @@
box_size = self.box_size(widget)
ctx.set_line_width(box_size / 8)
- ctx.set_line_cap(cairo.LINE_CAP_ROUND)
# Draw lines into the cell
for start, end, colour in self.in_lines:
self.render_line (ctx, cell_area, box_size,
bg_area.y, bg_area.height,
- start, end, colour)
+ start, end, colour, flags)
# Draw lines out of the cell
for start, end, colour in self.out_lines:
self.render_line (ctx, cell_area, box_size,
bg_area.y + bg_area.height, bg_area.height,
- start, end, colour)
+ start, end, colour, flags)
# Draw the revision node in the right column
(column, colour) = self.node
@@ -169,6 +168,12 @@
cell_area.y + cell_area.height / 2,
box_size / 4, 0, 2 * math.pi)
+ if flags & gtk.CELL_RENDERER_SELECTED:
+ ctx.set_source_rgb(1.0, 1.0, 1.0)
+ ctx.set_line_width(box_size / 4)
+ ctx.stroke_preserve()
+ ctx.set_line_width(box_size / 8)
+
self.set_colour(ctx, colour, 0.0, 0.5)
ctx.stroke_preserve()
@@ -177,8 +182,9 @@
self.render_tags(ctx, widget.create_pango_context(), cell_area, box_size)
- def render_line(self, ctx, cell_area, box_size, mid, height, start, end, colour):
+ def render_line(self, ctx, cell_area, box_size, mid, height, start, end, colour, flags):
if start is None:
+ ctx.set_line_cap(cairo.LINE_CAP_ROUND)
x = cell_area.x + box_size * end + box_size / 2
ctx.move_to(x, mid + height / 3)
ctx.line_to(x, mid + height / 3)
@@ -186,29 +192,39 @@
ctx.line_to(x, mid + height / 6)
elif end is None:
+ ctx.set_line_cap(cairo.LINE_CAP_ROUND)
x = cell_area.x + box_size * start + box_size / 2
ctx.move_to(x, mid - height / 3)
ctx.line_to(x, mid - height / 3)
ctx.move_to(x, mid - height / 6)
ctx.line_to(x, mid - height / 6)
+
else:
+ ctx.set_line_cap(cairo.LINE_CAP_BUTT)
startx = cell_area.x + box_size * start + box_size / 2
endx = cell_area.x + box_size * end + box_size / 2
ctx.move_to(startx, mid - height / 2)
if start - end == 0 :
- ctx.line_to(endx, mid + height / 2)
+ ctx.line_to(endx, mid + height / 2 + 1)
else:
ctx.curve_to(startx, mid - height / 5,
startx, mid - height / 5,
startx + (endx - startx) / 2, mid)
-
+
ctx.curve_to(endx, mid + height / 5,
endx, mid + height / 5 ,
- endx, mid + height / 2)
-
+ endx, mid + height / 2 + 1)
+
+ if flags & gtk.CELL_RENDERER_SELECTED:
+ ctx.set_source_rgb(1.0, 1.0, 1.0)
+ ctx.set_line_width(box_size / 5)
+ ctx.stroke_preserve()
+ ctx.set_line_width(box_size / 8)
+
self.set_colour(ctx, colour, 0.0, 0.65)
+
ctx.stroke()
def render_tags(self, ctx, pango_ctx, cell_area, box_size):
More information about the bazaar-commits
mailing list