diff options
author | Kevin Walzer <kw@codebykevin.com> | 2014-09-23 14:25:17 (GMT) |
---|---|---|
committer | Kevin Walzer <kw@codebykevin.com> | 2014-09-23 14:25:17 (GMT) |
commit | 1fd8dd92ec0d2fbc634dda12df7e51eff384add2 (patch) | |
tree | 7e59d090b5d17c3fe6c7a8d865517d169a2bb820 /macosx | |
parent | cac064749d2b29add7f870fc6bdd88f8859e3127 (diff) | |
download | tk-1fd8dd92ec0d2fbc634dda12df7e51eff384add2.zip tk-1fd8dd92ec0d2fbc634dda12df7e51eff384add2.tar.gz tk-1fd8dd92ec0d2fbc634dda12df7e51eff384add2.tar.bz2 |
Fine-tune display of buttons on Tk/Cocoa on horizontal scroll
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXButton.c | 7 | ||||
-rw-r--r-- | macosx/tkMacOSXSubwindows.c | 1 | ||||
-rw-r--r-- | macosx/tkMacOSXWindowEvent.c | 2 |
3 files changed, 10 insertions, 0 deletions
diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c index 95611d0..58383ca 100644 --- a/macosx/tkMacOSXButton.c +++ b/macosx/tkMacOSXButton.c @@ -67,6 +67,13 @@ static NSRect TkMacOSXGetButtonFrame(TkButton *butPtr); return; } + 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) { + return; + } + } } [super drawRect:dirtyRect]; diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c index d557db3..22012f9 100644 --- a/macosx/tkMacOSXSubwindows.c +++ b/macosx/tkMacOSXSubwindows.c @@ -455,6 +455,7 @@ MoveResizeWindow( macParent = macWin->winPtr->parentPtr->privatePtr; parentBorderwidth = macWin->winPtr->parentPtr->changes.border_width; + UpdateOffsets(macWin->winPtr, deltaX, deltaY);//todo? } if (macParent) { diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c index 319bc70..2e5e204 100644 --- a/macosx/tkMacOSXWindowEvent.c +++ b/macosx/tkMacOSXWindowEvent.c @@ -779,6 +779,8 @@ Tk_MacOSXIsAppInFront(void) @implementation TKContentView @end +#define TK_MAC_DEBUG_DRAWING + static Tk_RestrictAction ExposeRestrictProc( ClientData arg, |