From 448a502ba05a2df6be18150253cf6ecc0f289389 Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Fri, 29 Aug 2003 12:44:05 +0000 Subject: [PATCH] Improve fail layout. git-svn-id: http://dom-editor.googlecode.com/svn/branches/Gtk2@511 ef21e15d-ca94-4315-9c45-0d95b1b2e117 --- Dome/List.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Dome/List.py b/Dome/List.py index a1d7c1f..e3cf19e 100644 --- a/Dome/List.py +++ b/Dome/List.py @@ -377,7 +377,11 @@ class ChainOp(ChainNode): self.next = None if op.fail and op.fail.prev[0] == op: - self.fail = da.create_op(op.fail, x + 100, y + self.height + 4) + if op.next: + indent = self.next.width + 20 + else: + indent = 100 + self.fail = da.create_op(op.fail, x + indent, y + self.height + 4) else: self.fail = None @@ -399,7 +403,7 @@ class ChainOp(ChainNode): w.draw_layout(da.style.black_gc, self.x + 12, self.y, self.layout) self.draw_link(self.next, 5, 10, 'black') - self.draw_link(self.fail, 10, 10, 'red') + self.draw_link(self.fail, 5, 14, 'red') if (op, 'next') in self.da.view.breakpoints: w.draw_arc(da.style.black_gc, True, @@ -415,7 +419,8 @@ class ChainOp(ChainNode): da = self.da pen = da.style.white_gc pen.set_rgb_fg_color(g.gdk.color_parse(colour)) - da.backing.draw_line(pen, self.x + dx, self.y + dy, dest.x + 5, dest.y) + da.backing.draw_line(pen, self.x + dx, self.y + dy, dest.x + 5, self.y + dy) + da.backing.draw_line(pen, dest.x + 5, self.y + dy, dest.x + 5, dest.y) pen.set_rgb_fg_color(g.gdk.color_parse('white')) def where(self, x, y): -- 2.11.4.GIT