feat/percentage-based-container-sizing #18

Merged
lucasoskorep merged 1 commits from feat/percentage-based-container-sizing into main 2026-02-25 11:36:39 -05:00
Owner
No description provided.
lucasoskorep added 4 commits 2026-02-25 11:00:41 -05:00
- 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)
Previously _minRatio was baked into WindowContainer at construction time
and never updated. Now adjustBoundary() takes minRatio as a parameter,
WindowManager._getMinRatio() reads it from Gio.Settings on every call,
and the settings reference is injected from extension.ts on enable().
feat: new window gets 1/n ratio, existing windows scale proportionally
All checks were successful
Build and Test / build (pull_request) Successful in 25s
Build and Test / release (pull_request) Has been skipped
241f90299c
Previously addWindow() reset all ratios to equal splits, losing any
custom sizing. Now _addRatioForNewWindow() gives the new window 1/n of
the space and scales the existing windows by (n-1)/n, preserving their
ratios relative to each other.

e.g. [1/3, 1/6, 1/2] + new → [0.25, 0.125, 0.375, 0.25]
lucasoskorep added 1 commit 2026-02-25 11:24:17 -05:00
refactor: code review cleanup pass
All checks were successful
Build and Test / build (pull_request) Successful in 23s
Build and Test / release (pull_request) Has been skipped
22c9851886
- Collapse getHorizontalBounds/getVerticalBounds into _computeBounds(axis)
- Delete dead adjustBoundaryBothAxes method
- Collapse double-loop in getContainerForWindow into one pass
- Remove _findActiveContainer/_findContainerHoldingWindow duplication;
  call _findContainerForWindowAcrossMonitors directly
- Pass Gio.Settings via WindowManager constructor instead of public field
- Introduce keybindingActions() in extension.ts to unify setupKeybindings
  and refreshKeybinding; collapse 7-block bindSettings pattern into a loop
- Promote WindowWrapper.RESIZE_TOLERANCE to private static readonly
- Simplify redundant else-if in minimized handler
- Remove unused imports in monitor.ts (queueEvent, Mtk, Window alias)
- Deduplicate get_active_workspace() call in monitor.tileWindows()
- Strip redundant JSDoc and inline comments throughout
lucasoskorep added 1 commit 2026-02-25 11:31:44 -05:00
remove min-ratio setting and enforcement
All checks were successful
Build and Test / build (pull_request) Successful in 24s
Build and Test / release (pull_request) Has been skipped
bc23c93a5f
- Drop minRatio parameter from container.adjustBoundary; guard is now
  newLeft/newRight <= 0 (i.e. only prevent a pane from inverting)
- Remove _getMinRatio() helper and all call sites in windowManager.ts
- Remove Window Sizing preferences group and min-window-size-percent
  spin button from prefs.ts
- Remove min-window-size-percent GSettings key from schema XML
lucasoskorep force-pushed feat/percentage-based-container-sizing from bc23c93a5f to d9197babfb 2026-02-25 11:33:17 -05:00 Compare
lucasoskorep force-pushed feat/percentage-based-container-sizing from d9197babfb to 4be7602316 2026-02-25 11:36:02 -05:00 Compare
lucasoskorep merged commit 19696298d0 into main 2026-02-25 11:36:39 -05:00
lucasoskorep deleted branch feat/percentage-based-container-sizing 2026-02-25 11:36:39 -05:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lucasoskorep/aerospike-gnome#18