summaryrefslogtreecommitdiff
path: root/grid.go
diff options
context:
space:
mode:
Diffstat (limited to 'grid.go')
-rw-r--r--grid.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/grid.go b/grid.go
index 7f8747d..244159f 100644
--- a/grid.go
+++ b/grid.go
@@ -1,8 +1,8 @@
package gui
import (
+ "go.wit.com/lib/widget"
"go.wit.com/log"
- "go.wit.com/gui/widget"
)
// Grid numbering examples (H) or (W,H)
@@ -24,7 +24,7 @@ import (
// -----------------------------
type Grid struct {
- Width int
+ Width int
Height int
}
@@ -53,7 +53,7 @@ func (n *Node) NewGrid(progname string, w int, h int) *Node {
// true if the grid already have a child at W,H
func (n *Node) gridCollision() bool {
for _, child := range n.children {
- if ((child.AtW == n.NextW) && (child.AtH == n.NextH)) {
+ if (child.AtW == n.NextW) && (child.AtH == n.NextH) {
return true
}
}
@@ -62,12 +62,12 @@ func (n *Node) gridCollision() bool {
// keeps incrementing NextW & NextH until there is not a widget
func (n *Node) gridIncrement() {
- if ! n.gridCollision() {
+ if !n.gridCollision() {
return
}
n.NextW += 1
- if (n.NextW > n.W) {
+ if n.NextW > n.W {
n.NextW = 1
n.NextH += 1
}
@@ -76,7 +76,7 @@ func (n *Node) gridIncrement() {
}
func (n *Node) At(w int, h int) *Node {
- if (n == nil) {
+ if n == nil {
return n
}