diff options
author | peter.spjuth@gmail.com <pspjuth> | 2007-02-25 04:30:30 (GMT) |
---|---|---|
committer | peter.spjuth@gmail.com <pspjuth> | 2007-02-25 04:30:30 (GMT) |
commit | 5d36908d682240529e6c04fd061cad8855457aa6 (patch) | |
tree | cd64b54644945efba1f91c85a2ea0365cb88415a /generic/tkUtil.c | |
parent | d2c0db23c724102532be6ecc4b0684e60d73e032 (diff) | |
download | tk-5d36908d682240529e6c04fd061cad8855457aa6.zip tk-5d36908d682240529e6c04fd061cad8855457aa6.tar.gz tk-5d36908d682240529e6c04fd061cad8855457aa6.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: |