diff options
author | patthoyts <patthoyts@users.sourceforge.net> | 2016-09-22 00:03:26 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@users.sourceforge.net> | 2016-09-22 00:03:26 (GMT) |
commit | f54609000a192f8eac04dd2f9fc45b9dd88283a6 (patch) | |
tree | 099583cfbd87076fc584356d8ad6fdd85561c98b /generic/ttk/ttkButton.c | |
parent | a996a938e03b66b6555ece11854c31c45c673669 (diff) | |
parent | 6bbe98fbbffd229a352bccf036bc781272f0be47 (diff) | |
download | tk-f54609000a192f8eac04dd2f9fc45b9dd88283a6.zip tk-f54609000a192f8eac04dd2f9fc45b9dd88283a6.tar.gz tk-f54609000a192f8eac04dd2f9fc45b9dd88283a6.tar.bz2 |
Merge core-8-6-branch to trunk.
Diffstat (limited to 'generic/ttk/ttkButton.c')
-rw-r--r-- | generic/ttk/ttkButton.c | 13 |
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; } |