diff options
author | bptato <nincsnevem662@gmail.com> | 2023-06-12 23:36:09 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-06-12 23:36:09 +0200 |
commit | 3a245434cd4bd75a56700ed7814f78699e3a3dd7 (patch) | |
tree | 7ee3f396443ee652857f308a3b2a29f43b2e09ef /src/layout/box.nim | |
parent | d7e9633303952f82b0741391d16b0f958f95d3e5 (diff) | |
download | chawan-3a245434cd4bd75a56700ed7814f78699e3a3dd7.tar.gz |
Fix various layout bugs, prepare for image support
Diffstat (limited to 'src/layout/box.nim')
-rw-r--r-- | src/layout/box.nim | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/layout/box.nim b/src/layout/box.nim index 5acc7ef6..1167ca7b 100644 --- a/src/layout/box.nim +++ b/src/layout/box.nim @@ -23,7 +23,6 @@ type Viewport* = ref object window*: WindowAttributes - root*: seq[BlockBox] positioned*: seq[BlockBox] BoxBuilder* = ref object of RootObj @@ -100,7 +99,7 @@ type width*: int contentWidth*: int contentHeight*: Option[int] - maxContentWidth*: int + contentWidthInfinite*: bool charwidth*: int whitespacenum*: int @@ -139,14 +138,8 @@ type contentWidth*: int contentHeight*: Option[int] shrink*: bool - # The sole purpose of maxContentWidth is to stretch children of table - # cells to infinity in its maximum width calculation pass. - # For blocks with a specified width, maxContentWidth does nothing. - # This should never be used for anything other than setting width to - # min(maxContentWidth, width)! Failure to do so will almost certainly - # result in overflow errors (because maxContentWidth may be set to - # high(int).) - maxContentWidth*: int + # Whether to stretch content to infinity. + contentWidthInfinite*: bool positioned*: bool x_positioned*: bool |