Commit graph

16 commits

Author SHA1 Message Date
2634383ffd layout: add newRow function, which increments the layout y position by the current cell height, while resetting the x position and internal width 2025-08-04 21:34:36 -04:00
Kyle McLamb
0084ccba2e Remove nextUp() and nextLeft()
We need the expected size of the new cell to do it correctly, and that
would introduce an inconsistency between up/left and the existing row/col
functions.
2016-10-04 17:41:35 -07:00
Kyle McLamb
a4ebbc2679 Fix bug with layout left()/up()
When moving down/right, we use the old cell size because we are moving
the start point outside of the existing cell. When we go up/right, we
are doing actually doing the inverse operation, moving backwards using
the new cell size. We still check to see if there's an old cell because
up()/down()/left()/right() should behave the same for the first cell.
2016-10-04 17:41:35 -07:00
vrld
046233fc5f Merge pull request #45 from Alloyed/fix-layout-pop
Fix layout:pop() to actually pop off of the stack
2016-08-28 18:13:52 +02:00
Kyle McLamb
ec361de482 Fix layout:pop() to actually pop off of the stack 2016-08-27 10:19:07 -04:00
Kyle McLamb
b19f0a3bff Add Layout:up/down/left/right()
up() places the next cell above the previous one, and left() places the
next cell to the left of the previous one. down() and right() are
aliases to row()/col(), for symmetry.

Also added are nextX() variants for function.
2016-08-08 13:22:07 -04:00
Matthias Richter
10767cca33 Fix wrong padding in nested layouts
Previoysly, padding was added before adding a cell, which lead to
incorrect and unaligned cell placement in nested layouts.
Now padding is only added when at least one cell has been placed before.
2016-04-17 21:00:45 +02:00
Matthias Richter
f02976d969 Remove debug printout in layout.lua 2016-01-16 03:09:36 +01:00
Matthias Richter
18880de088 Actually revert changes in :push() (commit 09a4583) 2016-01-16 02:26:05 +01:00
Matthias Richter
09a458386c Revert change in :push(), remove :pos()
Revert signature if layout:push(x,y, padx,pady) to layout:push(x,y)
Makes it possible to use the idiomatic layout:push(layout:row()) again.
(layout:row() returns x,y, w,h of last cell)

Remove layout:pos([x,y]) because it's not needed and potentially confusing.
2016-01-16 02:08:36 +01:00
Matthias Richter
36c446cdcc Code cleanup, fix edge cases 2016-01-12 21:49:12 +01:00
Matthias Richter
fb7bed76f6 Add helper for nested layouts 2016-01-12 21:12:40 +01:00
Matthias Richter
b0b2e6561d Fix #25 - Throw error when trying to construct an empty cell. 2016-01-03 18:47:52 +01:00
Matthias Richter
652291c175 Correct license header 2016-01-01 21:38:20 +01:00
Matthias Richter
0af9460410 Expose padding function 2016-01-01 21:36:43 +01:00
Matthias Richter
b5137a4477 LET THERE BE SUIT! 2015-12-31 18:23:52 +01:00