summaryrefslogtreecommitdiffstats
path: root/generic/tkUtil.c
diff options
context:
space:
mode:
authorpspjuth <pspjuth@noemail.net>2007-02-25 04:30:29 (GMT)
committerpspjuth <pspjuth@noemail.net>2007-02-25 04:30:29 (GMT)
commit94767497e54500385e5c30afeb5f0eef5d9546d0 (patch)
treecd64b54644945efba1f91c85a2ea0365cb88415a /generic/tkUtil.c
parentb845aa77569c9dcf6d43603f04c6f477d42b0ebe (diff)
downloadtk-94767497e54500385e5c30afeb5f0eef5d9546d0.zip
tk-94767497e54500385e5c30afeb5f0eef5d9546d0.tar.gz
tk-94767497e54500385e5c30afeb5f0eef5d9546d0.tar.bz2
Fixed grid anchor center problem in labelframes. [Bug 1545765]
FossilOrigin-Name: 751503f41e14f552eee94e8731888a1addaf1481
Diffstat (limited to 'generic/tkUtil.c')
-rw-r--r--generic/tkUtil.c10
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: