fix: Size the expanded dialog and grid columns to their content (#2611)
- Closes #2607
This commit is contained in:
@@ -27,3 +27,18 @@ grid_max_columns]` that will fit at least a `600px` column width.
|
||||
- Otherwise, use the largest number of columns in the range `[2 -
|
||||
grid_max_columns]` that will fit at least a `190px` column width.
|
||||
- Otherwise, there will be `1` column only.
|
||||
|
||||
Unless `grid_columns` is specified, that number is then reduced to the number of
|
||||
columns the items actually need. Surplus columns would otherwise be left empty
|
||||
and every item shrunk to a width it did not need -- a single camera taking half
|
||||
the grid, for example.
|
||||
|
||||
The number of columns needed is the sum of each item's
|
||||
[`width_factor`](cameras/README.md?id=dimensions), rounded up to a whole number
|
||||
of columns per item, plus enough extra columns for any one of them to be
|
||||
selected (see `grid_selected_width_factor` in [`live`](live.md?id=display) or
|
||||
[`media_viewer`](media-viewer.md?id=display)). That room is reserved whether or
|
||||
not there is a selection, so selecting an item never changes the number of
|
||||
columns -- which would otherwise resize the items the user did not interact
|
||||
with. A grid with a single item is an exception, as that item can never be wider
|
||||
than the whole grid.
|
||||
|
||||
Reference in New Issue
Block a user