Subject: gitk: Fix restoring of column widths in the commit tree

From: Sergey Vlasov <[email-masked]>
Date: Sun, 11 Feb 2007 19:58:33 +0300

On Linux with Tk 8.4.13 after each gitk restart the column dividers
were shifting more and more to the right.  Apparently the value from
[winfo width $canv] is larger than the value of the -width option
specified when creating the widget due to non-zero -highlightthickness
used by default.  But gitk never shows the focus highlight on canvases
used for the commit tree, so we can just set "-highlightthickness 0",
which fixes the width mismatch.

(The code before commit 3468e71f452701b3eff6a2aeb826bbe0cdad8270
subtracted 2 from widths of canvases when saving them - apparently to
account for that hidden highlightthickness; I suppose that Cygwin
behaves differently - hope that "-highlightthickness 0" will give
proper results everywhere.)

Signed-off-by: Sergey Vlasov <[email-masked]>
---
 gitk |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/gitk b/gitk
index 7e6ee56..ea3d68a 100755
--- a/gitk
+++ b/gitk
@@ -459,14 +459,17 @@ proc makewindow {} {
     set canv .tf.histframe.pwclist.canv
     canvas $canv -width $geometry(canv) \
 	-background $bgcolor -bd 0 \
+	-highlightthickness 0 \
 	-yscrollincr $linespc -yscrollcommand "scrollcanv $cscroll"
     .tf.histframe.pwclist add $canv
     set canv2 .tf.histframe.pwclist.canv2
     canvas $canv2 -width $geometry(canv2) \
+	-highlightthickness 0 \
 	-background $bgcolor -bd 0 -yscrollincr $linespc
     .tf.histframe.pwclist add $canv2
     set canv3 .tf.histframe.pwclist.canv3
     canvas $canv3 -width $geometry(canv3) \
+	-highlightthickness 0 \
 	-background $bgcolor -bd 0 -yscrollincr $linespc
     .tf.histframe.pwclist add $canv3
 
-- 
1.5.0.rc4.50.g403de