summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkButton.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-09-26 09:50:07 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-09-26 09:50:07 (GMT)
commit716853d7df8e0f73778e0f53ee74564a5c282892 (patch)
tree4f43564f3a0b41e20e7ed8b4f510c27550f98d9a /generic/ttk/ttkButton.c
parent06f3173fc0a3402010291caa151baa8fef3e5a9d (diff)
parent05a224b57c876cd9db9d2478dddf9614b16b0661 (diff)
downloadtk-716853d7df8e0f73778e0f53ee74564a5c282892.zip
tk-716853d7df8e0f73778e0f53ee74564a5c282892.tar.gz
tk-716853d7df8e0f73778e0f53ee74564a5c282892.tar.bz2
merge core-8-6-branch
Diffstat (limited to 'generic/ttk/ttkButton.c')
-rw-r--r--generic/ttk/ttkButton.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/generic/ttk/ttkButton.c b/generic/ttk/ttkButton.c
index bc44f25..c00754b 100644
--- a/generic/ttk/ttkButton.c
+++ b/generic/ttk/ttkButton.c
@@ -136,6 +136,15 @@ BaseCleanup(void *recordPtr)
TtkFreeImageSpec(basePtr->base.imageSpec);
}
+static void
+BaseImageChanged(
+ ClientData clientData, int x, int y, int width, int height,
+ int imageWidth, int imageHeight)
+{
+ Base *basePtr = (Base *)clientData;
+ TtkResizeWidget(&basePtr->core);
+}
+
static int BaseConfigure(Tcl_Interp *interp, void *recordPtr, int mask)
{
Base *basePtr = recordPtr;
@@ -149,8 +158,8 @@ static int BaseConfigure(Tcl_Interp *interp, void *recordPtr, int mask)
}
if (basePtr->base.imageObj) {
- imageSpec = TtkGetImageSpec(
- interp, basePtr->core.tkwin, basePtr->base.imageObj);
+ imageSpec = TtkGetImageSpecEx(
+ interp, basePtr->core.tkwin, basePtr->base.imageObj, BaseImageChanged, basePtr);
if (!imageSpec) {
goto error;
}