awesome/spec/wibox/layout
Uli Schlachter c80bf6f46e wibox.layout.flex: Do not leave empty space behind
It is not possible to distribute 100px to three widgets equally. The
current version of wibox.layout.flex tries to do that anyway, by giving
each widget 33px and leaving one pixel outside of any widget. Thus, if
the widgets e.g. have a common background, this leads to a one pixel gap
in the background.

This patch changes the flex layout so that the extra pixel is assigned
to some widget instead. It does so by basically keeping a sum of
space_per_item for the widgets that was assigned so far. This sum is
rounded and when this leads to rounding, the corresponding child widget
gets an extra pixel.

More precisely, this tracks a pos as before. Widgets get their position
still assigned based on rounding pos. However, this now also remembers
this rounded position for the next iteration of the loop. This allows to
assign the size of widgets based on the difference between the current
and last rounded position.

(Possibly) fixes: https://github.com/awesomeWM/awesome/issues/2461
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-11-05 10:13:18 +01:00
..
align_spec.lua Add tests for get_children of layouts 2017-06-08 17:00:44 +02:00
fixed_spec.lua Add tests for get_children of layouts 2017-06-08 17:00:44 +02:00
flex_spec.lua wibox.layout.flex: Do not leave empty space behind 2018-11-05 10:13:18 +01:00
grid_spec.lua Add tests for get_children of layouts 2017-06-08 17:00:44 +02:00