summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-08-11 13:24:52 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-08-11 13:24:52 (GMT)
commita8b0abe63a5f3a8ec798808c44a2decc3208e495 (patch)
treee637e6f16280dfcf5ad4ccc076308d19dd5fcc8b /win
parent66930bdc1683af2cb8483b3987138af8fdb9a0d1 (diff)
parent8dbe479c2b90db57ec0730bb71363f8fdb293915 (diff)
downloadtk-a8b0abe63a5f3a8ec798808c44a2decc3208e495.zip
tk-a8b0abe63a5f3a8ec798808c44a2decc3208e495.tar.gz
tk-a8b0abe63a5f3a8ec798808c44a2decc3208e495.tar.bz2
Fix [29ba539501]: many PIXEL options don't keep their configured value
Diffstat (limited to 'win')
-rw-r--r--win/tkWinButton.c16
-rw-r--r--win/tkWinMenu.c6
2 files changed, 11 insertions, 11 deletions
diff --git a/win/tkWinButton.c b/win/tkWinButton.c
index f8cdd2f..6ce1bff 100644
--- a/win/tkWinButton.c
+++ b/win/tkWinButton.c
@@ -564,10 +564,10 @@ TkpDisplayButton(
return;
}
- Tk_GetPixelsFromObj(NULL, tkwin, butPtr->borderWidthPtr, &butPtr->borderWidth);
- Tk_GetPixelsFromObj(NULL, tkwin, butPtr->highlightWidthPtr, &butPtr->highlightWidth);
- Tk_GetPixelsFromObj(NULL, tkwin, butPtr->padXPtr, &butPtr->padX);
- Tk_GetPixelsFromObj(NULL, tkwin, butPtr->padYPtr, &butPtr->padY);
+ Tk_GetPixelsFromObj(NULL, tkwin, butPtr->borderWidthObj, &butPtr->borderWidth);
+ Tk_GetPixelsFromObj(NULL, tkwin, butPtr->highlightWidthObj, &butPtr->highlightWidth);
+ Tk_GetPixelsFromObj(NULL, tkwin, butPtr->padXObj, &butPtr->padX);
+ Tk_GetPixelsFromObj(NULL, tkwin, butPtr->padYObj, &butPtr->padY);
border = butPtr->normalBorder;
if ((butPtr->state == STATE_DISABLED) && (butPtr->disabledFg != NULL)) {
@@ -998,8 +998,8 @@ TkpComputeButtonGeometry(
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
- Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->highlightWidthPtr, &butPtr->highlightWidth);
- Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->borderWidthPtr, &butPtr->borderWidth);
+ Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->highlightWidthObj, &butPtr->highlightWidth);
+ Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->borderWidthObj, &butPtr->borderWidth);
butPtr->inset = butPtr->highlightWidth + butPtr->borderWidth;
butPtr->indicatorSpace = 0;
@@ -1193,8 +1193,8 @@ TkpComputeButtonGeometry(
* because otherwise it is not really a compound button.
*/
- Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->padXPtr, &butPtr->padX);
- Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->padYPtr, &butPtr->padY);
+ Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->padXObj, &butPtr->padX);
+ Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->padYObj, &butPtr->padY);
if (butPtr->compound != COMPOUND_NONE && haveImage && haveText) {
switch ((enum compound) butPtr->compound) {
diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c
index 068d6d6..22aadef 100644
--- a/win/tkWinMenu.c
+++ b/win/tkWinMenu.c
@@ -1600,7 +1600,7 @@ GetMenuIndicatorGeometry(
int borderWidth;
Tk_GetPixelsFromObj(menuPtr->interp, menuPtr->tkwin,
- menuPtr->borderWidthPtr, &borderWidth);
+ menuPtr->borderWidthObj, &borderWidth);
*widthPtr = indicatorDimensions[1] - borderWidth;
/*
@@ -1844,7 +1844,7 @@ DrawMenuEntryIndicator(
rect.top = y;
rect.bottom = y + mePtr->height;
Tk_GetPixelsFromObj(menuPtr->interp, menuPtr->tkwin,
- menuPtr->borderWidthPtr, &borderWidth);
+ menuPtr->borderWidthObj, &borderWidth);
Tk_GetPixelsFromObj(menuPtr->interp, menuPtr->tkwin,
menuPtr->activeBorderWidthPtr, &activeBorderWidth);
rect.left = borderWidth + activeBorderWidth + x;
@@ -2990,7 +2990,7 @@ TkpComputeStandardMenuGeometry(
}
Tk_GetPixelsFromObj(menuPtr->interp, menuPtr->tkwin,
- menuPtr->borderWidthPtr, &borderWidth);
+ menuPtr->borderWidthObj, &borderWidth);
x = y = borderWidth;
indicatorSpace = labelWidth = accelWidth = 0;
windowHeight = 0;