change X/Windows message-box checkbox spacing again: make the message region at least as large as the icon

svn: r3304
This commit is contained in:
Matthew Flatt 2006-06-09 15:57:02 +00:00
parent 137ca08979
commit a6a9f17294

View File

@ -113,9 +113,15 @@
(send btn-pnl stretchable-height #f) (send btn-pnl stretchable-height #f)
(values msg-pnl btn-pnl btn-pnl 96 'right 'left 'top)))] (values msg-pnl btn-pnl btn-pnl 96 'right 'left 'top)))]
[else (let ([p (new horizontal-pane% [parent f] [alignment '(center top)])]) [else (let ([p (new horizontal-pane% [parent f] [alignment '(center top)])])
(make-object message% icon-id p) (let ([icon-msg (make-object message% icon-id p)]
(let ([msg-pnl (new vertical-pane% [parent p])]) [msg-pnl (new vertical-pane% [parent p])])
(values msg-pnl f msg-pnl 0 'center 'center 'center)))])]) (values (if single?
(new horizontal-pane%
[parent msg-pnl]
[alignment '(center top)]
[min-height (send icon-msg min-height)])
msg-pnl)
f msg-pnl 0 'center 'center 'center)))])])
(if single? (if single?
(begin (begin
(send msg-pnl set-alignment (if (= (length strings) 1) msg-h-align 'left) msg-v-align) (send msg-pnl set-alignment (if (= (length strings) 1) msg-h-align 'left) msg-v-align)
@ -152,12 +158,10 @@
(let ([p (new vertical-pane% [parent cb-pnl] (let ([p (new vertical-pane% [parent cb-pnl]
[stretchable-height #f] [stretchable-height #f]
[alignment '(left center)])]) [alignment '(left center)])])
(when single? (when (and single?
(if (eq? 'macosx (system-type)) (eq? 'macosx (system-type)))
;; Match text-panel margin: ;; Match text-panel margin:
(send p horiz-margin 8) (send p horiz-margin 8))
;; Put space between message an checkbox:
(new message% [parent p] [label " "])))
(new check-box% (new check-box%
[label check-message] [label check-message]
[parent p] [parent p]