racket/gui cocoa: fix 'resize-border style for dialog%

Also, fix documentation to reflect windo styles of different Mac OS X
versions.
This commit is contained in:
Matthew Flatt 2013-11-12 14:10:32 -07:00
parent 8039f8177d
commit e18f87918e
4 changed files with 14 additions and 10 deletions

View File

@ -60,9 +60,9 @@ The @racket[style] flags adjust the appearance of the dialog on some
@item{@racket['no-caption] --- omits the title bar for the dialog @item{@racket['no-caption] --- omits the title bar for the dialog
(Windows)} (Windows)}
@item{@racket['resize-border] --- adds a resizeable border @item{@racket['resize-border] --- adds a resizeable border around the
around the window (Windows) or grow box in the bottom right corner window (Windows), ability to resize the window (Mac OS X), or grow
(Mac OS X)} box in the bottom right corner (older Mac OS X)}
@item{@racket['no-sheet] --- uses a movable window for the dialog, @item{@racket['no-sheet] --- uses a movable window for the dialog,
even if a parent window is provided (Mac OS X)} even if a parent window is provided (Mac OS X)}

View File

@ -58,8 +58,8 @@ some platforms:
@itemize[ @itemize[
@item{@racket['no-resize-border] --- omits the resizeable border @item{@racket['no-resize-border] --- omits the resizeable border
around the window (Windows, Unix) or grow box in the bottom right around the window (Windows, Unix), ability to resize the window (Mac
corner (Mac OS X)} OS X), or grow box in the bottom right corner (older Mac OS X)}
@item{@racket['no-caption] --- omits the title bar for the frame @item{@racket['no-caption] --- omits the title bar for the frame
(Windows, Mac OS X, Unix)} (Windows, Mac OS X, Unix)}

View File

@ -5,10 +5,10 @@
A @racket[grow-box-spacer-pane%] object is intended for use as a A @racket[grow-box-spacer-pane%] object is intended for use as a
lightweight spacer in the bottom-right corner of a frame, rather than lightweight spacer in the bottom-right corner of a frame, rather than
as a container. On Mac OS X, a as a container. On older version of Mac OS X, a
@racket[grow-box-spacer-pane%] has the same width and height as the @racket[grow-box-spacer-pane%] has the same width and height as the
grow box that is inset into the bottom-right corner of a frame. On grow box that is inset into the bottom-right corner of a frame. On
Windows and Unix, a @racket[grow-box-spacer-pane%] has zero width and Windows, Unix, and recent Mac OS X, a @racket[grow-box-spacer-pane%] has zero width and
height. Unlike all other container types, a height. Unlike all other container types, a
@racket[grow-box-spacer-pane%] is unstretchable by default. @racket[grow-box-spacer-pane%] is unstretchable by default.

View File

@ -236,9 +236,13 @@
NSTitledWindowMask NSTitledWindowMask
(if is-sheet? NSUtilityWindowMask 0) (if is-sheet? NSUtilityWindowMask 0)
(if is-dialog? (if is-dialog?
(bitwise-ior
(if (memq 'close-button style) (if (memq 'close-button style)
NSClosableWindowMask NSClosableWindowMask
0) 0)
(if (memq 'resize-border style)
NSResizableWindowMask
0))
(bitwise-ior (bitwise-ior
NSClosableWindowMask NSClosableWindowMask
NSMiniaturizableWindowMask NSMiniaturizableWindowMask