feat: percentage-based container sizing with live boundary resize
- Add _splitRatios[] to WindowContainer — each child owns a fraction of the parent that always sums to 1.0; bounds are computed via prefix-sum so the last item absorbs rounding remainder (no pixel gaps) - addWindow/removeWindow reset to equal splits; itemDragged swaps only items (ratios stay slot-based) so windows take the size of the slot they move into - Add adjustBoundary() for live edge-drag resizing clamped to a configurable minimum (default 10%, schema key min-window-size-percent) - Add reset-ratios keybinding (Ctrl+Z) that resets the active container to equal splits via WindowManager.resetActiveContainerRatios() - Connect size-changed signal alongside position-changed so east/south edge drags (width-only changes) are detected and the adjacent window is repositioned live - Replace LIFO pop() event queue with name-keyed Map so duplicate events collapse to the latest callback and timers never fight each other - Remove redundant move_frame() before move_resize_frame(); fix retry condition to use symmetric pixel tolerance - Add _isTiling re-entrancy guard around all tileWindows() call sites so compositor position-changed callbacks cannot recurse - Remove double tileWindows() call in monitor.tileWindows() (move() already calls it internally)
This commit is contained in:
@@ -49,5 +49,18 @@
|
||||
<description>Toggles the orientation of the container holding the active window between horizontal and vertical</description>
|
||||
</key>
|
||||
|
||||
<key name="reset-ratios" type="as">
|
||||
<default><![CDATA[['<Primary>z']]]></default>
|
||||
<summary>Reset container ratios to equal splits</summary>
|
||||
<description>Resets all window size ratios in the active window's container to equal splits</description>
|
||||
</key>
|
||||
|
||||
<key name="min-window-size-percent" type="d">
|
||||
<default>0.10</default>
|
||||
<range min="0.01" max="0.49"/>
|
||||
<summary>Minimum window size percentage</summary>
|
||||
<description>Minimum fraction of a container that any single window may occupy when resizing boundaries</description>
|
||||
</key>
|
||||
|
||||
</schema>
|
||||
</schemalist>
|
||||
Reference in New Issue
Block a user