Make cmd_resize_tiling_direction work with pixels

Introduces resize_neighboring_cons in resize.c which is also used by
resize_graphical_handler.

Co-authored-by: Andrew Laucius <andrewla@gmail.com>
Authored original code and tests in #3240. I rewrote most of the
resizing code and fixed the failing tests.
This commit is contained in:
Orestis Floros
2018-08-23 22:09:52 +03:00
parent ea43507bed
commit 2ead7745d6
7 changed files with 159 additions and 61 deletions

View File

@ -2330,12 +2330,12 @@ resize set [width] <width> [px | ppt] [height] <height> [px | ppt]
-------------------------------------------------------
Direction can either be one of +up+, +down+, +left+ or +right+. Or you can be
less specific and use +width+ or +height+, in which case i3 will take/give
space from all the other containers. The optional pixel argument specifies by
how many pixels a *floating container* should be grown or shrunk (the default
is 10 pixels). The ppt argument means percentage points and specifies by how
many percentage points a *tiling container* should be grown or shrunk (the
default is 10 percentage points).
less specific and use +width+ or +height+, in which case i3 will take/give space
from all the other containers. The optional pixel argument specifies by how many
pixels a container should be grown or shrunk (the default is 10 pixels). The
optional ppt argument means "percentage points", and if specified it indicates
that a *tiling container* should be grown or shrunk by that many points, instead
of by the +px+ value.
Notes about +resize set+: a value of 0 for <width> or <height> means "do
not resize in this direction", and resizing a tiling container by +px+ is not