reduce right padding of a mac os x message%; add space between a text-field% label and edit box (on all platforms)

svn: r11392
This commit is contained in:
Matthew Flatt 2008-08-22 21:40:10 +00:00
parent 70a71422ba
commit 54ffac164a
2 changed files with 6 additions and 5 deletions

View File

@ -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))]

View File

@ -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();