cocoa: make grow-box-spacer zero-width for 10.7

This commit is contained in:
Matthew Flatt 2011-10-03 17:37:56 -06:00
parent 6fd2e9c1d3
commit 3941a5d04f
9 changed files with 26 additions and 10 deletions

View File

@ -88,4 +88,5 @@
make-screen-bitmap make-screen-bitmap
make-gl-bitmap make-gl-bitmap
check-for-break check-for-break
key-symbol-to-menu-key)) key-symbol-to-menu-key
needs-grow-box-spacer?))

View File

@ -62,7 +62,8 @@
play-sound play-sound
file-creator-and-type file-creator-and-type
file-selector file-selector
key-symbol-to-menu-key) key-symbol-to-menu-key
needs-grow-box-spacer?)
(import-class NSScreen NSCursor NSMenu) (import-class NSScreen NSCursor NSMenu)
@ -188,3 +189,6 @@
(define (get-highlight-text-color) (define (get-highlight-text-color)
#f) #f)
(define (needs-grow-box-spacer?)
(not (version-10.7-or-later?)))

View File

@ -22,7 +22,8 @@
->wxb ->wxb
->wx ->wx
old-cocoa? old-cocoa?
version-10.6-or-later?) version-10.6-or-later?
version-10.7-or-later?)
define-mz) define-mz)
(define cocoa-lib (ffi-lib (format "/System/Library/Frameworks/Cocoa.framework/Cocoa"))) (define cocoa-lib (ffi-lib (format "/System/Library/Frameworks/Cocoa.framework/Cocoa")))
@ -87,3 +88,5 @@
(NSAppKitVersionNumber . < . 949)) (NSAppKitVersionNumber . < . 949))
(define (version-10.6-or-later?) (define (version-10.6-or-later?)
(NSAppKitVersionNumber . >= . 1038)) (NSAppKitVersionNumber . >= . 1038))
(define (version-10.7-or-later?)
(NSAppKitVersionNumber . >= . 1138))

View File

@ -89,4 +89,5 @@
make-screen-bitmap make-screen-bitmap
make-gl-bitmap make-gl-bitmap
check-for-break check-for-break
key-symbol-to-menu-key)) key-symbol-to-menu-key
needs-grow-box-spacer?))

View File

@ -58,7 +58,8 @@
get-panel-background get-panel-background
fill-private-color fill-private-color
get-color-from-user get-color-from-user
key-symbol-to-menu-key) key-symbol-to-menu-key
needs-grow-box-spacer?)
(define (find-graphical-system-path what) (define (find-graphical-system-path what)
(case what (case what
@ -155,3 +156,5 @@
bm)) bm))
(define (check-for-break) #f) (define (check-for-break) #f)
(define (needs-grow-box-spacer?) #f)

View File

@ -75,5 +75,6 @@
make-screen-bitmap make-screen-bitmap
make-gl-bitmap make-gl-bitmap
check-for-break check-for-break
key-symbol-to-menu-key) key-symbol-to-menu-key
needs-grow-box-spacer?)
((dynamic-require platform-lib 'platform-values))) ((dynamic-require platform-lib 'platform-values)))

View File

@ -89,4 +89,5 @@
make-screen-bitmap make-screen-bitmap
make-gl-bitmap make-gl-bitmap
check-for-break check-for-break
key-symbol-to-menu-key)) key-symbol-to-menu-key
needs-grow-box-spacer?))

View File

@ -57,7 +57,8 @@
special-control-key special-control-key
special-option-key special-option-key
get-color-from-user get-color-from-user
key-symbol-to-menu-key) key-symbol-to-menu-key
needs-grow-box-spacer?)
(define (find-graphical-system-path what) (define (find-graphical-system-path what)
#f) #f)
@ -113,3 +114,5 @@
(make-object win32-bitmap% w h #f c)) (make-object win32-bitmap% w h #f c))
(define (check-for-break) #f) (define (check-for-break) #f)
(define (needs-grow-box-spacer?) #f)

View File

@ -841,8 +841,7 @@
(define wx-grow-box-pane% (define wx-grow-box-pane%
(class100 (wx-make-pane% wx:windowless-panel% #f) (mred proxy parent style label) (class100 (wx-make-pane% wx:windowless-panel% #f) (mred proxy parent style label)
(override (override
[init-min (lambda (x) (if (or (eq? (system-type) 'macos) [init-min (lambda (x) (if (wx:needs-grow-box-spacer?)
(eq? (system-type) 'macosx))
15 15
0))]) 0))])
(sequence (sequence