From: Sergey Vlasov <vsu@altlinux.ru>
To: Mark Levedahl <mdl123@verizon.net>,
Junio C Hamano <junkio@cox.net>,
Paul Mackerras <paulus@samba.org>
Cc: git@vger.kernel.org, Sergey Vlasov <vsu@altlinux.ru>
Subject: gitk: Fix restoring of column widths in the commit tree
Date: Sun, 11 Feb 2007 19:58:33 +0300 [thread overview]
Message-ID: <11712131153045-git-send-email-vsu@altlinux.ru> (raw)
In-Reply-To: <117121311393-git-send-email-vsu@altlinux.ru>
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@altlinux.ru>
---
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
next prev parent reply other threads:[~2007-02-11 16:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-11 14:27 [PATCH] Make gitk save and restore the user set window position Mark Levedahl
2007-02-11 14:27 ` Mark Levedahl
2007-02-11 14:27 ` [PATCH] Clean up geometry save code in gitk Mark Levedahl
2007-02-11 16:56 ` Sergey Vlasov
2007-02-11 16:58 ` gitk: Fix restoring of pane sizes Sergey Vlasov
2007-02-11 16:58 ` Sergey Vlasov [this message]
2007-02-11 17:44 ` [PATCH] Clean up geometry save code in gitk Mark Levedahl
2007-02-11 21:49 ` [PATCH] Make gitk save and restore the user set window position Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11712131153045-git-send-email-vsu@altlinux.ru \
--to=vsu@altlinux.ru \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=mdl123@verizon.net \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).