diff options
author | pspjuth <peter.spjuth@gmail.com> | 2007-02-25 04:30:30 (GMT) |
---|---|---|
committer | pspjuth <peter.spjuth@gmail.com> | 2007-02-25 04:30:30 (GMT) |
commit | b8d2831d91a1f2014b0bf3398b87d58e0ae5ebcf (patch) | |
tree | cd64b54644945efba1f91c85a2ea0365cb88415a /generic/tkUtil.c | |
parent | 33432c59af4ba34defb03b255dad42030e7db41e (diff) | |
download | tk-b8d2831d91a1f2014b0bf3398b87d58e0ae5ebcf.zip tk-b8d2831d91a1f2014b0bf3398b87d58e0ae5ebcf.tar.gz tk-b8d2831d91a1f2014b0bf3398b87d58e0ae5ebcf.tar.bz2 |
Fixed grid anchor center problem in labelframes. [Bug 1545765]
Diffstat (limited to 'generic/tkUtil.c')
-rw-r--r-- | generic/tkUtil.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/generic/tkUtil.c b/generic/tkUtil.c index 3cf672d..05a76d2 100644 --- a/generic/tkUtil.c +++ b/generic/tkUtil.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUtil.c,v 1.16 2007/01/19 06:29:20 das Exp $ + * RCS: @(#) $Id: tkUtil.c,v 1.17 2007/02/25 04:30:30 pspjuth Exp $ */ #include "tkInt.h" @@ -796,7 +796,9 @@ TkComputeAnchor( case TK_ANCHOR_N: case TK_ANCHOR_CENTER: case TK_ANCHOR_S: - *xPtr = (Tk_Width(tkwin) - innerWidth) / 2; + *xPtr = (Tk_Width(tkwin) - innerWidth - Tk_InternalBorderLeft(tkwin) - + Tk_InternalBorderRight(tkwin)) / 2 + + Tk_InternalBorderLeft(tkwin); break; default: @@ -815,7 +817,9 @@ TkComputeAnchor( case TK_ANCHOR_W: case TK_ANCHOR_CENTER: case TK_ANCHOR_E: - *yPtr = (Tk_Height(tkwin) - innerHeight) / 2; + *yPtr = (Tk_Height(tkwin) - innerHeight- Tk_InternalBorderTop(tkwin) - + Tk_InternalBorderBottom(tkwin)) / 2 + + Tk_InternalBorderTop(tkwin); break; default: |