diff options
| author | Pietro Gagliardi <[email protected]> | 2014-08-25 16:07:35 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-08-25 16:07:35 -0400 |
| commit | 910f78c7e59f12d8cd99183c5b0b743f30ee5951 (patch) | |
| tree | 5dde1dd5bf41f350bdb5a549ece742a07865995e /redo/textfield_darwin.go | |
| parent | f6d7797fd6225ff0e7aa9507858dd8e5496b9559 (diff) | |
Made the width of TextFields more reasonable on Mac OS X.
Diffstat (limited to 'redo/textfield_darwin.go')
| -rw-r--r-- | redo/textfield_darwin.go | 4 |
1 files changed, 3 insertions, 1 deletions
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) { |
