diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-12-17 15:01:46 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-12-17 15:01:46 (GMT) |
commit | 8150acfc1c5ec02aaba46d2a5571e3934bbe6cf5 (patch) | |
tree | f9aadfcad8485b193d3034a0ba5d1ce0d4f431bb /generic/tkPack.c | |
parent | 477a4dc3ba8b6594484d08f875840d36fb3fce75 (diff) | |
download | tk-8150acfc1c5ec02aaba46d2a5571e3934bbe6cf5.zip tk-8150acfc1c5ec02aaba46d2a5571e3934bbe6cf5.tar.gz tk-8150acfc1c5ec02aaba46d2a5571e3934bbe6cf5.tar.bz2 |
In case-statements, use "default:" in stead of "case TK_ANCHOR_CENTER:". So unknown enum values will be handled as "center".
Diffstat (limited to 'generic/tkPack.c')
-rw-r--r-- | generic/tkPack.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/generic/tkPack.c b/generic/tkPack.c index ac5d73f..dd8977c 100644 --- a/generic/tkPack.c +++ b/generic/tkPack.c @@ -826,12 +826,10 @@ ArrangePacking( x = frameX + borderLeft; y = frameY + borderTop; break; - case TK_ANCHOR_CENTER: + default: x = frameX + (borderLeft + frameWidth - width - borderRight)/2; y = frameY + (borderTop + frameHeight - height - borderBtm)/2; break; - default: - Tcl_Panic("bad frame factor in ArrangePacking"); } width -= contentPtr->doubleBw; height -= contentPtr->doubleBw; |