racket/gui cocoa: toolbar-button is for 10.6 and earlier, only
In particular, 'toobar-button (before 10.7) and 'fullscreen-button (10.7 and later) do not get along, so use only one of them.
This commit is contained in:
parent
32374df556
commit
5193e37f0b
|
@ -70,8 +70,9 @@ some platforms:
|
|||
(Windows)}
|
||||
|
||||
@item{@racket['toolbar-button] --- includes a toolbar button on the
|
||||
frame's title bar (Mac OS X); a click on the toolbar button triggers
|
||||
frame's title bar (Mac OS X 10.6 and earlier); a click on the toolbar button triggers
|
||||
a call to @method[frame% on-toolbar-button-click]}
|
||||
|
||||
@item{@racket['hide-menu-bar] --- hides the menu bar and dock when
|
||||
the frame is active (Mac OS X) or asks the window manager to make
|
||||
the frame fullscreen (Unix)}
|
||||
|
@ -87,10 +88,10 @@ some platforms:
|
|||
@item{@racket['metal] --- ignored (formerly supported for Mac OS X)}
|
||||
|
||||
@item{@racket['fullscreen-button] --- includes a button on the
|
||||
frame's title bar to put the frame in fullscreen mode (Mac OS X)}
|
||||
frame's title bar to put the frame in fullscreen mode (Mac OS X 10.7 and later)}
|
||||
|
||||
@item{@racket['fullscreen-aux] --- allows the frame to accompany
|
||||
another that is in fullscreen mode (Mac OS X)}
|
||||
another that is in fullscreen mode (Mac OS X 10.7 and later)}
|
||||
|
||||
]
|
||||
|
||||
|
|
|
@ -266,12 +266,13 @@
|
|||
(define cocoa (get-cocoa))
|
||||
(tellv cocoa setDelegate: cocoa)
|
||||
|
||||
(when (memq 'toolbar-button style)
|
||||
(atomically
|
||||
(let ([tb (tell (tell NSToolbar alloc) initWithIdentifier: #:type _NSString "Ok")])
|
||||
(tellv cocoa setToolbar: tb)
|
||||
(tellv tb setVisible: #:type _BOOL #f)
|
||||
(tellv tb release))))
|
||||
(unless (version-10.7-or-later?)
|
||||
(when (memq 'toolbar-button style)
|
||||
(atomically
|
||||
(let ([tb (tell (tell NSToolbar alloc) initWithIdentifier: #:type _NSString "Ok")])
|
||||
(tellv cocoa setToolbar: tb)
|
||||
(tellv tb setVisible: #:type _BOOL #f)
|
||||
(tellv tb release)))))
|
||||
|
||||
(internal-move #f (or y 0))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user