summaryrefslogtreecommitdiff
path: root/redo/sizing.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-07-28 15:02:27 -0400
committerPietro Gagliardi <[email protected]>2014-07-28 15:02:27 -0400
commit286704beddf7a4b3bf5bcdfa7a7ea4e32110d7d3 (patch)
treeafe620872b92c1ba3824ba2153d92473226ab284 /redo/sizing.go
parent13bcf728baf81705ddd09c72991893bffa34b8ae (diff)
Fixed the proper recursive application of spaced on Windows tabs by having container.resize() also take the origin coordinates as arguments.
Diffstat (limited to 'redo/sizing.go')
-rw-r--r--redo/sizing.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/redo/sizing.go b/redo/sizing.go
index b828cd7..d9c3927 100644
--- a/redo/sizing.go
+++ b/redo/sizing.go
@@ -34,12 +34,12 @@ type container struct {
// set to true to apply spacing to all windows
var spaced bool = false
-func (c *container) resize(width, height int) {
+func (c *container) resize(x, y, width, height int) {
if c.child == nil { // no children; nothing to do
return
}
d := c.beginResize()
- allocations := c.child.allocate(0 + d.xmargin, 0 + d.ymargin, width - (2 * d.xmargin), height - (2 * d.ymargin), d)
+ allocations := c.child.allocate(x + d.xmargin, y + d.ymargin, width - (2 * d.xmargin), height - (2 * d.ymargin), 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-- {