Commit e40b9a3
committed
fix: square-only grid layout for all live views
Two fixes:
1. WebRTCVideoCell: add missing stream disable button + overlays
(power icon in controls, inline confirm, disabled overlay with
re-enable button — matches HLS and MSE cells added in previous commit)
2. GridPicker / computeOptimalGrid: always produce square grids
Before: lookup table returned rectangles for many counts
n=2 → [2,1], n=5 → [3,2], n=6 → [3,2], n=12 → [4,3] etc.
After: s = ceil(sqrt(n)), always return [s, s]
n=2 → [2,2], n=5 → [3,3], n=6 → [3,3], n=12 → [4,4]
The GridPicker popover itself also used a rectangular cell grid
(gridRows = ceil(max/gridCols)) which could produce 3×2, 4×3, etc.
Now gridRows = gridCols = ceil(sqrt(effectiveMax)) so the picker
is always a square and never forces a landscape/portrait orientation.1 parent 0886259 commit e40b9a3
1 file changed
Lines changed: 11 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
36 | 28 | | |
37 | 29 | | |
38 | 30 | | |
| |||
52 | 44 | | |
53 | 45 | | |
54 | 46 | | |
55 | | - | |
56 | | - | |
| 47 | + | |
| 48 | + | |
57 | 49 | | |
58 | | - | |
59 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
60 | 53 | | |
61 | 54 | | |
62 | 55 | | |
| |||
0 commit comments