summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-08-13 09:34:49 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-08-13 09:34:49 (GMT)
commit97c1bfe0390fe9733937e3ea2969e82df596e0e1 (patch)
tree37a8943028518af29417414888ccd58fb1d00ccb /macosx
parenta7e64736cfaf3c6e6d9444585f5b1f0dc9c52246 (diff)
parent162b7b3ca96237392063619cd366db41eb0280da (diff)
downloadtk-97c1bfe0390fe9733937e3ea2969e82df596e0e1.zip
tk-97c1bfe0390fe9733937e3ea2969e82df596e0e1.tar.gz
tk-97c1bfe0390fe9733937e3ea2969e82df596e0e1.tar.bz2
Merge 8.6
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXEntry.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/macosx/tkMacOSXEntry.c b/macosx/tkMacOSXEntry.c
index a1c5d60..7915f6f 100644
--- a/macosx/tkMacOSXEntry.c
+++ b/macosx/tkMacOSXEntry.c
@@ -124,16 +124,17 @@ TkpDrawEntryBorderAndFocus(
int incDecWidth;
/*
- * Temporarily change the width of the widget so that the same code can
- * be used for drawing the Entry portion of the Spinbox as is used to
- * draw an ordinary Entry. The width must be restored before
- * returning.
+ * If native spinbox buttons are going to be drawn, then temporarily
+ * change the width of the widget so that the same code can be used
+ * for drawing the Entry portion of the Spinbox as is used to draw
+ * an ordinary Entry. The width must be restored before returning.
*/
oldWidth = Tk_Width(tkwin);
- ComputeIncDecParameters(Tk_Height(tkwin) - 2 * MAC_OSX_FOCUS_WIDTH,
- &incDecWidth);
- Tk_Width(tkwin) -= incDecWidth + 1;
+ if (ComputeIncDecParameters(Tk_Height(tkwin) - 2 * MAC_OSX_FOCUS_WIDTH,
+ &incDecWidth) != 0) {
+ Tk_Width(tkwin) -= incDecWidth + 1;
+ }
}
/*
@@ -186,10 +187,10 @@ TkpDrawEntryBorderAndFocus(
* have to implement it.
*
* Results:
- * 1 if it has drawn the border, 0 if not.
+ * 1 if it has drawn the buttons, 0 if not.
*
* Side effects:
- * May draw the entry border into pixmap.
+ * May draw the buttons into pixmap.
*
*--------------------------------------------------------------
*/
@@ -258,9 +259,9 @@ TkpDrawSpinboxButtons(
*/
bgGC = Tk_GCForColor(sbPtr->entry.highlightBgColorPtr, d);
- rects[0].x = bounds.origin.x;
+ rects[0].x = Tk_Width(tkwin) - incDecWidth - 1;
rects[0].y = 0;
- rects[0].width = Tk_Width(tkwin);
+ rects[0].width = incDecWidth + 1;
rects[0].height = Tk_Height(tkwin);
XFillRectangles(Tk_Display(tkwin), d, bgGC, rects, 1);