This website requires JavaScript.
Explore
Help
Register
Sign In
StealthOS
/
subiquity
Watch
1
Star
0
Fork
You've already forked subiquity
0
Code
Issues
Pull Requests
Packages
Projects
Releases
Wiki
Activity
88b6dcb6c6
subiquity
/
subiquitycore
/
ui
/
tests
/
__init__.py
Ignoring revisions in
.git-blame-ignore-revs
. Click
here to bypass
and see the normal blame view.
2 lines
2 B
Python
Raw
Normal View
History
Unescape
Escape
Tweak the adjustment of table columns widths for cells with colspan > 1 When allocating space for a cell colspan > 1, preferentially allocate space to columns that have no colspan = 1 cells. If you have content like this (content padded to 10 and 20 chars to make calculations easier): [[(2, "longer content567890"), "shorter890"], ["shorter890", (2, "longer content567890")]] Taking only colspan = 1 cells into account, the widths of the columns are (10, 0, 10). To fit the first longer content in, the current algorithm expands the first two columns equally, so the widths become (15, 5, 10). Then to fit the second longer content in, the second two columns are widened equally (or nearly so), resulting in final widths of (15, 8, 12) and a table layout like this: +-------------------------+--------------+ | longer content567890 | shorter890 | +-----------------+-------+--------------+ | shorter890 | longer content567890 | +-----------------+----------------------+ which is bizarrely asymmetrical given the input and wider than it needs to be. If instead we preferentially widen columns that have no width from colspan = 1 columns, we get this layout: +----------------------+------------+ | longer content567890 | shorter890 | +------------+---------+------------+ | shorter890 | longer content567890 | +------------+----------------------+ Which is much more in line with my expectations.
2019-05-27 23:18:19 +00:00
#