# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1301420217 0 # Node ID 2967934fb587414e28abc5c7b5e1bbe320818a41 # Parent ccfa5173659f7fcc2e3c9c79be3de24c0b99e039 Implemented the fix for the scrollbox problem on the Mac (that was discovered on Windows) diff -r ccfa5173659f -r 2967934fb587 mac/dw.m --- a/mac/dw.m Tue Mar 29 17:21:50 2011 +0000 +++ b/mac/dw.m Tue Mar 29 17:36:57 2011 +0000 @@ -699,14 +699,19 @@ @interface DWScrollBox : NSScrollView { void *userdata; + id box; } -(void *)userdata; -(void)setUserdata:(void *)input; +-(void)setBox:(void *)input; +-(id)box; @end @implementation DWScrollBox -(void *)userdata { return userdata; } -(void)setUserdata:(void *)input { userdata = input; } +-(void)setBox:(void *)input { box = input; } +-(id)box { return box; } -(void)dealloc { UserData *root = userdata; _remove_userdata(&root, NULL, TRUE); [super dealloc]; } @end @@ -2620,11 +2625,14 @@ { DWScrollBox *scrollbox = [[DWScrollBox alloc] init]; DWBox *box = dw_box_new(type, pad); + DWBox *tmpbox = dw_box_new(DW_VERT, 0); + dw_box_pack_start(tmpbox, box, 1, 1, TRUE, TRUE, 0); [scrollbox setHasVerticalScroller:YES]; [scrollbox setHasHorizontalScroller:YES]; [scrollbox setBorderType:NSNoBorder]; [scrollbox setDrawsBackground:NO]; - [scrollbox setDocumentView:box]; + [scrollbox setBox:box]; + [scrollbox setDocumentView:tmpbox]; return scrollbox; } @@ -2686,7 +2694,7 @@ else if([ object isMemberOfClass:[ DWScrollBox class ] ]) { DWScrollBox *scrollbox = box; - view = [scrollbox documentView]; + view = [scrollbox box]; } thisbox = [view box]; @@ -2794,7 +2802,7 @@ else if([ object isMemberOfClass:[ DWScrollBox class ] ]) { DWScrollBox *scrollbox = box; - view = [scrollbox documentView]; + view = [scrollbox box]; } thisbox = [view box];