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 | e11d1bc0cb52ca2873204e1e8db7b67ed5fff7be (patch) | |
tree | 9bb2baa5968ef2217b2ae3909e37029417b29558 | |
parent | df3fb86c8aedf3f02e9ccf7ffc78a063b04c9992 (diff) | |
download | tk-e11d1bc0cb52ca2873204e1e8db7b67ed5fff7be.zip tk-e11d1bc0cb52ca2873204e1e8db7b67ed5fff7be.tar.gz tk-e11d1bc0cb52ca2873204e1e8db7b67ed5fff7be.tar.bz2 |
Fine-tune display of buttons on Tk/Cocoa on horizontal scroll
-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, |