Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with NSCollectionView and single column views #319

Merged
merged 3 commits into from
Nov 17, 2024

Conversation

johnathan-becker
Copy link
Contributor

This pull request improves the frameForItemAtIndex: method by refining the layout calculation logic for items. I removed the _horizontalMargin offset from the initial x position to align items more precisely with the view’s edges, standardizing row alignment by resetting x to 0 at the start of each row, and introducing dynamic resizing for single-column layouts, ensuring items span the full width of the view. These updates enhance the visual consistency of both multi-column and single-column layouts, while maintaining functionality for features like dragging offsets. The changes have been tested to ensure alignment and layout behavior remain robust and predictable.

Screenshot from 2024-11-15 13-03-50
Screenshot from 2024-11-15 12-56-32

@johnathan-becker
Copy link
Contributor Author

@fredkiefer I believe automation is just broken on master. I am getting the same failures on this MR.

@fredkiefer
Copy link
Member

As this class was mostly written by Greg, I think it would be better for him to review this change.

Copy link
Member

@gcasa gcasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested these changes and they work fine for me.

@gcasa gcasa merged commit bc53ea0 into gnustep:master Nov 17, 2024
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants