From 64d5eb541eb28e1a7e81adca66a72155d16033b4 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 17 Mar 2014 21:09:03 -0400 Subject: Changed the new resizing code so that it uses the same allocated slice per window instead of making a new one to store all the resize requests each time. --- lineedit.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lineedit.go') diff --git a/lineedit.go b/lineedit.go index 71f4529..4ad6889 100644 --- a/lineedit.go +++ b/lineedit.go @@ -67,14 +67,14 @@ func (l *LineEdit) make(window *sysData) error { return nil } -func (l *LineEdit) setRect(x int, y int, width int, height int) []resizerequest { - return []resizerequest{resizerequest{ +func (l *LineEdit) setRect(x int, y int, width int, height int, rr *[]resizerequest) { + *rr = append(*rr, resizerequest{ sysData: l.sysData, x: x, y: y, width: width, height: height, - }} + }) } func (l *LineEdit) preferredSize() (width int, height int) { -- cgit v1.2.3