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
(Windows)}
@item{@racket['resize-border] --- adds a resizeable border
around the window (Windows) or grow box in the bottom right corner
(Mac OS X)}
@item{@racket['resize-border] --- adds a resizeable border around the
window (Windows), ability to resize the window (Mac OS X), or grow
box in the bottom right corner (older Mac OS X)}
@item{@racket['no-sheet] --- uses a movable window for the dialog,
even if a parent window is provided (Mac OS X)}

View File

@ -58,8 +58,8 @@ some platforms:
@itemize[
@item{@racket['no-resize-border] --- omits the resizeable border
around the window (Windows, Unix) or grow box in the bottom right
corner (Mac OS X)}
around the window (Windows, Unix), ability to resize the window (Mac
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
(Windows, Mac OS X, Unix)}

View File

@ -5,10 +5,10 @@
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
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
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
@racket[grow-box-spacer-pane%] is unstretchable by default.

View File

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