Mercurial > dwindows
diff mac/dw.m @ 1531:783a464afab2
Added window and box support to dw_window_get_preferred_size() on OS/2 and Windows.
Fixed a number of potentially dangerous code segments on OS/2 and Windows.
Updated inaccurate comments due to cut and paste and code changes and the readme.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sat, 07 Jan 2012 13:59:58 +0000 |
parents | eecfceaf581f |
children | 7bc189ef0cd0 |
line wrap: on
line diff
--- a/mac/dw.m Sat Jan 07 03:46:10 2012 +0000 +++ b/mac/dw.m Sat Jan 07 13:59:58 2012 +0000 @@ -8524,7 +8524,7 @@ /* Calculate space requirements */ _resize_box(thisbox, &depth, (int)width, (int)height, 1); - /* Might need to take into account the window border here */ + /* Update components that need auto-sizing */ if(width < 1) content.size.width = thisbox->minwidth; if(height < 1) content.size.height = thisbox->minheight; } @@ -8558,9 +8558,10 @@ /* Calculate space requirements */ _resize_box(thisbox, &depth, 0, 0, 1); + /* Figure out the border size */ frame = [NSWindow frameRectForContentRect:NSMakeRect(0, 0, thisbox->minwidth, thisbox->minheight) styleMask:[object styleMask]]; - /* Might need to take into account the window border here */ + /* Return what was requested */ if(width) *width = frame.size.width; if(height) *height = frame.size.height; } @@ -8576,7 +8577,7 @@ /* Calculate space requirements */ _resize_box(thisbox, &depth, 0, 0, 1); - /* Might need to take into account the window border here */ + /* Return what was requested */ if(width) *width = thisbox->minwidth; if(height) *height = thisbox->minheight; }