gitk: Fix restoring of column widths in the commit tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <vsu@xxxxxxxxxxx>
---
 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

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]