From 910f78c7e59f12d8cd99183c5b0b743f30ee5951 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 25 Aug 2014 16:07:35 -0400 Subject: Made the width of TextFields more reasonable on Mac OS X. --- redo/textfield_darwin.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'redo/textfield_darwin.go') diff --git a/redo/textfield_darwin.go b/redo/textfield_darwin.go index cbe5f8b..89711d4 100644 --- a/redo/textfield_darwin.go +++ b/redo/textfield_darwin.go @@ -81,7 +81,9 @@ func (t *textfield) allocate(x int, y int, width int, height int, d *sizing) []* } func (t *textfield) preferredSize(d *sizing) (width, height int) { - return basepreferredSize(t, d) + _, height = basepreferredSize(t, d) + // the returned width is based on the contents; use this instead + return C.textfieldWidth, height } func (t *textfield) commitResize(a *allocation, d *sizing) { -- cgit v1.2.3