From 982004d05052ef6aadd22dd5c4e7dbca85ab324a Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Thu, 2 Oct 2014 10:05:53 -0400 Subject: go fmt. Precursor to bug report filing. --- container.go | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'container.go') diff --git a/container.go b/container.go index c855072..143985c 100644 --- a/container.go +++ b/container.go @@ -3,20 +3,20 @@ package ui type allocation struct { - x int - y int - width int - height int - this Control - neighbor Control + x int + y int + width int + height int + this Control + neighbor Control } type sizingbase struct { - xmargin int - ymargintop int - ymarginbottom int - xpadding int - ypadding int + xmargin int + ymargintop int + ymarginbottom int + xpadding int + ypadding int } type controlSizing interface { @@ -31,19 +31,19 @@ type controlSizing interface { // Tab and Group use containers for their content; as such, their commitResize() functions should only change the size of the Tab and Group themselves, and have their containers do the real work. // All containers must embed containerbase. type containerbase struct { - child Control + child Control } // set to true to apply spacing to all windows var spaced bool = false func (c *container) resize(x, y, width, height int) { - if c.child == nil { // no children; nothing to do + if c.child == nil { // no children; nothing to do return } d := c.beginResize() - allocations := c.child.allocate(x + d.xmargin, y + d.ymargintop, - width - (2 * d.xmargin), height - d.ymargintop - d.ymarginbottom, d) + allocations := c.child.allocate(x+d.xmargin, y+d.ymargintop, + width-(2*d.xmargin), height-d.ymargintop-d.ymarginbottom, d) c.translateAllocationCoords(allocations, width, height) // move in reverse so as to approximate right->left order so neighbors make sense for i := len(allocations) - 1; i >= 0; i-- { -- cgit v1.2.3