summaryrefslogtreecommitdiff
path: root/layout.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-06-26 15:51:34 -0400
committerPietro Gagliardi <[email protected]>2014-06-26 15:51:34 -0400
commitc40161763728272e6c29b0ac1b1089d872255f89 (patch)
tree1448f3e144e18b963a9a503ec20df0a972a272e8 /layout.go
parent999e669aa4b92d4df8e6a3209fb793d09b49519d (diff)
parent85f759ea5f192752efd63b1af8283a997f2d6210 (diff)
Merge pull request #21 from boppreh/master
Fix layout.go in regard to new padding and margin
Diffstat (limited to 'layout.go')
-rw-r--r--layout.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/layout.go b/layout.go
index e4fda38..e88cae4 100644
--- a/layout.go
+++ b/layout.go
@@ -1,14 +1,12 @@
package ui
-// Recursively removes border margins and padding from controls, replaces
-// nil values with stretchy spaces and reorients nested stack to have
-// opposing orientations.
+// Recursively replaces nils with stretchy empty spaces and changes the orientation
+// of inner stack so they are perpenticular to each other.
func resetControls(parent *Stack) {
for i, control := range parent.controls {
switch control.(type) {
case *Stack:
stack := control.(*Stack)
- stack.borderMargin = 0
stack.orientation = !parent.orientation
resetControls(stack)
case nil:
@@ -30,8 +28,6 @@ func Layout(controls ...Control) *Stack {
stretchy: make([]bool, len(controls)),
width: make([]int, len(controls)),
height: make([]int, len(controls)),
- padding: 10,
- borderMargin: 15,
}
resetControls(stack)