summaryrefslogtreecommitdiff
path: root/redo/container.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-08-24 21:23:19 -0400
committerPietro Gagliardi <[email protected]>2014-08-24 21:23:19 -0400
commitf9c5c41c77506142eef2461dd75b2178fc5b598a (patch)
treed4d0e86b35e166c85ee975510c95e317e0e9f149 /redo/container.go
parent01db831c4c40959504d46e14e0845eb179759013 (diff)
Split ymargin into top and bottom margins to accomodate Groups on Windows; fixed those.
Diffstat (limited to 'redo/container.go')
-rw-r--r--redo/container.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/redo/container.go b/redo/container.go
index f323952..c855072 100644
--- a/redo/container.go
+++ b/redo/container.go
@@ -12,10 +12,11 @@ type allocation struct {
}
type sizingbase struct {
- xmargin int
- ymargin int
- xpadding int
- ypadding int
+ xmargin int
+ ymargintop int
+ ymarginbottom int
+ xpadding int
+ ypadding int
}
type controlSizing interface {
@@ -41,7 +42,8 @@ func (c *container) resize(x, y, width, height int) {
return
}
d := c.beginResize()
- allocations := c.child.allocate(x + d.xmargin, y + d.ymargin, width - (2 * d.xmargin), height - (2 * d.ymargin), 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-- {