about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-05-30 21:47:55 +0200
committerbptato <nincsnevem662@gmail.com>2024-05-30 21:48:26 +0200
commit4af483ee6a6a3ab5853174c2399dc8942d8b2026 (patch)
tree66bb5bee3cfd348959e7dbf499a562941ad733de
parent01028c8f44ed44b76015ec03928339fd934d85a1 (diff)
downloadchawan-4af483ee6a6a3ab5853174c2399dc8942d8b2026.tar.gz
layout: fix regression
seems like this line is necessary after all
-rw-r--r--src/layout/engine.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/layout/engine.nim b/src/layout/engine.nim
index 0de2c308..4d532364 100644
--- a/src/layout/engine.nim
+++ b/src/layout/engine.nim
@@ -940,6 +940,9 @@ proc resolveBlockWidth(sizes: var ResolvedSizes;
     sizes.maxWidth = maxWidth
     if sizes.space.w.t in {scStretch, scFitContent} and
         maxWidth < sizes.space.w.u or sizes.space.w.t == scMaxContent:
+      # Warning: the following line seems to make no sense, but *is* needed.
+      #TODO figure out why.
+      sizes.space.w = stretch(maxWidth)
       if sizes.space.w.t == scStretch:
         # available width would stretch over max-width
         sizes.space.w = stretch(maxWidth)