diff options
| author | BoppreH <[email protected]> | 2014-06-26 15:37:19 -0300 |
|---|---|---|
| committer | BoppreH <[email protected]> | 2014-06-26 15:37:19 -0300 |
| commit | 85f759ea5f192752efd63b1af8283a997f2d6210 (patch) | |
| tree | fc3dab22f46c11affc7bb4e49f8e6f489a8fd52f | |
| parent | 52bccbc8da143e56e8b158d91d8aa93f1990d4c8 (diff) | |
Remove padding and margin from layout.go
| -rw-r--r-- | layout.go | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -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) |
