summaryrefslogtreecommitdiffstats
path: root/generic/tkPack.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-12-17 15:01:46 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-12-17 15:01:46 (GMT)
commit8150acfc1c5ec02aaba46d2a5571e3934bbe6cf5 (patch)
treef9aadfcad8485b193d3034a0ba5d1ce0d4f431bb /generic/tkPack.c
parent477a4dc3ba8b6594484d08f875840d36fb3fce75 (diff)
downloadtk-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.c4
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;