Fix issue #68: Unable to make window smaller (shorter) #87
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request fixes #68.
The changes made directly address the window resizing issue by:
Setting a minimum height constraint of 200 pixels (via
max(200, availableHeight)
andmax(200, contentHeight)
) which ensures the window remains usable while allowing it to be made smaller than beforeReducing the fixed padding from 100 to 40 pixels (
- 100
changed to- 40
), which provides more usable space for contentModifying the
realHeight
calculation logic to properly handle both expanded and collapsed states while respecting the minimum height constraintThe content will now be scrollable within these constraints since the view height can be smaller than the content height
These changes allow users to reduce the window height while maintaining functionality through scrolling, which directly solves the reported issue. The minimum height of 200px ensures the window remains usable even when heavily resized. The implementation is straightforward and uses standard SwiftUI layout principles, making it a robust solution to the reported problem.
Automatic fix generated by OpenHands 🙌