diff options
author | Kevin Walzer <kw@codebykevin.com> | 2014-10-18 18:49:47 (GMT) |
---|---|---|
committer | Kevin Walzer <kw@codebykevin.com> | 2014-10-18 18:49:47 (GMT) |
commit | 555fad6bd56d8aaf4978f6179ad93d29a95629a9 (patch) | |
tree | 4139b6936ee9e18958bd8cf3881144aa6df7f24a /macosx | |
parent | 31bab1c712c72533326e72b5c324a6c996d26a84 (diff) | |
download | tk-555fad6bd56d8aaf4978f6179ad93d29a95629a9.zip tk-555fad6bd56d8aaf4978f6179ad93d29a95629a9.tar.gz tk-555fad6bd56d8aaf4978f6179ad93d29a95629a9.tar.bz2 |
Fix display of buttons on Cocoa if horizontally scrolled outside parent widget
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXButton.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c index f3405d7..adbdda0 100644 --- a/macosx/tkMacOSXButton.c +++ b/macosx/tkMacOSXButton.c @@ -67,10 +67,11 @@ static NSRect TkMacOSXGetButtonFrame(TkButton *butPtr); return; } + /* Do not draw if the widget is completely outside of its parent, or within 50 pixels of the right border; this prevents buttons from being drawn on peer widgets as scrolling occurs. */ int parent_width = Tk_Width(Tk_Parent(tkwin)); int widget_width = Tk_Width(tkwin); int x = Tk_X(tkwin); - if (x > parent_width - 30 || x + widget_width < 0) { + if (x > parent_width - 50 || x < 0) { return; } } |