Skip to content

Allow zero to disable minimum window size limits - #1802

Open
culpen90 wants to merge 2 commits into
rxhanson:mainfrom
culpen90:fix/allow-zero-minimum-window-limit
Open

Allow zero to disable minimum window size limits#1802
culpen90 wants to merge 2 commits into
rxhanson:mainfrom
culpen90:fix/allow-zero-minimum-window-limit

Conversation

@culpen90

@culpen90 culpen90 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • allow an explicit zero minimum-window fraction to disable Rectangle's screen-relative limit
  • use a reusable DoubleDefault for minimum-window fractions while importing legacy float-backed configs
  • preserve the existing 25% default when no preference is stored
  • allow windows to reach an exact configured limit while retaining a one-point safety floor
  • document the zero-value behavior

Root cause

The minimum-size calculation treated zero as invalid and substituted the 25% default. On the reported 2560-point display, the next 30-point resize step from 665 to 635 points was rejected against a 640-point floor before any accessibility resize was attempted.

User impact

Setting minimumWindowWidth or minimumWindowHeight to 0 now lets the application enforce its native minimum size. Existing installations without an explicit setting continue to use Rectangle's 25% default.

Testing

  • ChangeSizeCalculationTests: 7 passed
  • all tests outside the two existing cooperative-resize test classes: 128 passed
  • full scheme: 171 passed; the 10 failing cooperative-resize test cases reproduce unchanged on upstream/main
  • git diff --check

Fixes #388

@culpen90
culpen90 marked this pull request as ready for review July 31, 2026 14:27
Comment thread Rectangle/Defaults.swift Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Window (Zoom) width can't go smaller, but using the mouse it can

2 participants