diff options
author | Kevin Walzer <kw@codebykevin.com> | 2018-10-18 01:43:44 (GMT) |
---|---|---|
committer | Kevin Walzer <kw@codebykevin.com> | 2018-10-18 01:43:44 (GMT) |
commit | 357905818935c2025461aae78e483ca3a5b51298 (patch) | |
tree | 1a2c5e70f2137ff17ffe846bc6083af3e8c031eb /macosx/tkMacOSXScrlbr.c | |
parent | 566cd6cc4d43ac0be15b5f02975566c38e4e4e5f (diff) | |
parent | c650f722da03d87c52824306cefeb20c03ebb8b4 (diff) | |
download | tk-357905818935c2025461aae78e483ca3a5b51298.zip tk-357905818935c2025461aae78e483ca3a5b51298.tar.gz tk-357905818935c2025461aae78e483ca3a5b51298.tar.bz2 |
Signficant fixes to scrolling in macOS
Diffstat (limited to 'macosx/tkMacOSXScrlbr.c')
-rw-r--r-- | macosx/tkMacOSXScrlbr.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c index a8018a5..f7f9489 100644 --- a/macosx/tkMacOSXScrlbr.c +++ b/macosx/tkMacOSXScrlbr.c @@ -231,17 +231,18 @@ TkpComputeScrollbarGeometry( * Using code from tkUnixScrlbr.c because Unix scroll bindings are * driving the display at the script level. All the Mac scrollbar * has to do is re-draw itself. + * There is a difference with Unix however: on macOS later than 10.6 + * (Snow Leopard) the scrollbars have no arrows at all. This is + * handled by having scrollPtr->arrowLength set to zero. */ - int width, fieldLength; + int fieldLength; if (scrollPtr->highlightWidth < 0) { scrollPtr->highlightWidth = 0; } scrollPtr->inset = scrollPtr->highlightWidth + scrollPtr->borderWidth; - width = (scrollPtr->vertical) ? Tk_Width(scrollPtr->tkwin) - : Tk_Height(scrollPtr->tkwin); - scrollPtr->arrowLength = width - 2*scrollPtr->inset + 1; + scrollPtr->arrowLength = 0; fieldLength = (scrollPtr->vertical ? Tk_Height(scrollPtr->tkwin) : Tk_Width(scrollPtr->tkwin)) - 2*(scrollPtr->arrowLength + scrollPtr->inset); |