From a6a9f17294a325e61e981f3124bc2a07c40cd2b8 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 9 Jun 2006 15:57:02 +0000 Subject: [PATCH] change X/Windows message-box checkbox spacing again: make the message region at least as large as the icon svn: r3304 --- collects/mred/private/messagebox.ss | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/collects/mred/private/messagebox.ss b/collects/mred/private/messagebox.ss index 53845a515e..6d2a7295b7 100644 --- a/collects/mred/private/messagebox.ss +++ b/collects/mred/private/messagebox.ss @@ -113,9 +113,15 @@ (send btn-pnl stretchable-height #f) (values msg-pnl btn-pnl btn-pnl 96 'right 'left 'top)))] [else (let ([p (new horizontal-pane% [parent f] [alignment '(center top)])]) - (make-object message% icon-id p) - (let ([msg-pnl (new vertical-pane% [parent p])]) - (values msg-pnl f msg-pnl 0 'center 'center 'center)))])]) + (let ([icon-msg (make-object message% icon-id p)] + [msg-pnl (new vertical-pane% [parent p])]) + (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? (begin (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] [stretchable-height #f] [alignment '(left center)])]) - (when single? - (if (eq? 'macosx (system-type)) - ;; Match text-panel margin: - (send p horiz-margin 8) - ;; Put space between message an checkbox: - (new message% [parent p] [label " "]))) + (when (and single? + (eq? 'macosx (system-type))) + ;; Match text-panel margin: + (send p horiz-margin 8)) (new check-box% [label check-message] [parent p]