From 0829d8ae9363b4ae8db66cffe037871bb7b097a6 Mon Sep 17 00:00:00 2001
From: Slava Pestov <slava@slava-pestovs-macbook-pro.local>
Date: Mon, 12 Jan 2009 19:32:10 -0600
Subject: [PATCH] Fix rendering of lines between columns

---
 basis/ui/gadgets/tables/tables.factor | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/basis/ui/gadgets/tables/tables.factor b/basis/ui/gadgets/tables/tables.factor
index 91ba8df94a..7beae09241 100644
--- a/basis/ui/gadgets/tables/tables.factor
+++ b/basis/ui/gadgets/tables/tables.factor
@@ -41,14 +41,11 @@ focused? ;
 : line-height ( table -- n )
     font>> open-font "" string-height ;
 
-CONSTANT: table-gap 5
+CONSTANT: table-gap 6
 
 : table-rows ( table -- rows )
     [ control-value ] [ renderer>> ] bi '[ _ row-columns ] map ;
 
-: column-offsets ( table -- xs )
-    0 [ table-gap + + ] accumulate nip ;
-
 : (compute-column-widths) ( font rows -- total widths )
     [ drop 0 { } ] [
         tuck [ first length 0 <repetition> ] 2dip
@@ -101,13 +98,16 @@ M: table layout*
 : draw-moused ( table -- )
     [ ] [ mouse-index>> ] [ mouse-color>> ] tri f highlight-row ;
 
-: column-lines ( widths -- xs )
-    0 [ + ] accumulate nip rest-slice ; inline
+: column-offsets ( table -- xs )
+    0 [ table-gap + + ] accumulate nip ;
+
+: column-line-offsets ( table -- xs )
+    column-offsets rest-slice [ table-gap 2/ - ] map ;
 
 : draw-columns ( table -- )
     [ column-line-color>> gl-color ]
     [
-        [ column-widths>> column-lines ] [ dim>> second ] bi
+        [ column-widths>> column-line-offsets ] [ dim>> second ] bi
         '[ [ 0 2array ] [ _ 2array ] bi gl-line ] each
     ] bi ;