From 54ffac164aa96a141eecacfe94b26a37dec80341 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 22 Aug 2008 21:40:10 +0000 Subject: [PATCH] reduce right padding of a mac os x message%; add space between a text-field% label and edit box (on all platforms) svn: r11392 --- collects/mred/private/wxtextfield.ss | 6 ++++-- src/wxmac/src/mac/wx_messg.cc | 5 ++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/collects/mred/private/wxtextfield.ss b/collects/mred/private/wxtextfield.ss index 6bce6bfa97..990e6b6950 100644 --- a/collects/mred/private/wxtextfield.ss +++ b/collects/mred/private/wxtextfield.ss @@ -92,7 +92,8 @@ (lambda () ((current-text-keymap-initializer) (send e get-keymap))))) (inherit alignment stretchable-in-y area-parent - get-min-size set-min-width set-min-height) + get-min-size set-min-width set-min-height + spacing) (rename [super-place-children place-children]) (public [command (lambda (e) ; No entry/exit needed @@ -148,7 +149,8 @@ (unless horiz? (send p alignment 'left 'top)) (unless multi? (stretchable-in-y #f)) ;; For Windows: - (wx:set-combo-box-font font)) + (wx:set-combo-box-font font) + (spacing 3)) (private-field [l (and label (make-object wx-message% #f proxy p label -1 -1 null font))] diff --git a/src/wxmac/src/mac/wx_messg.cc b/src/wxmac/src/mac/wx_messg.cc index 40657271ed..b9427202d7 100644 --- a/src/wxmac/src/mac/wx_messg.cc +++ b/src/wxmac/src/mac/wx_messg.cc @@ -235,10 +235,9 @@ void wxMessage::CreateWxMessage(char* label, wxFont* theFont) // common construc clientHeight = 14; if (font) { font->GetTextExtent(cMessage, 0, -1, &clientWidth, &clientHeight, NULL, NULL, TRUE); - if (font->GetStyle() != wxNORMAL) - clientWidth += 5; //cjc - try hello.cc italic labels are truncated } - SetClientSize((int)floor(clientWidth) + 3, (int)floor(clientHeight)); // mflatt: +3 is needed (even for plain) + SetClientSize((int)floor(clientWidth) + 1, /* +1 still seems to be needed to avoid bad clipping */ + (int)floor(clientHeight)); CreatePaintControl();