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

Changed calculation of x position in grid view to avoid position jitter #132

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

martinhering
Copy link

I noticed some jitter when scaling items in grid layout. This is due to the x position being calculated accumulatively from the left edge of the view. I changed that to use the center of a column as the reference point for the x position.

Martin Hering added 3 commits December 31, 2014 15:17
- Added option for disabling multiple selection
- Added sorting of selected indexes array
- Added multiple selection mode not deselect cells accidentally when using keys
- Fixed and improved keyboard support with multiple selection
@jwilling
Copy link
Owner

jwilling commented Jan 6, 2015

Hi, thanks for your pull request! Sorry for missing this when it came through last week. 🌟

I'm not exactly sure what's up with the diff. Is there any way you could rebase this based on the current master?

@martinhering
Copy link
Author

Actually I found an issue with my original positioning code for the grid layout. It's actually incompatible with the even padding option. In my fork, I marked itemPaddingEnabled as deprecated and removed support for that. I think for this type of behavior a flow layout would be the better solution. I also fixed the calculation of adjacent cells to account for vertical spacing and I completely reimplemented multiple selection with an option to turn it off. The problem was that it was not working with shift and option keys and the use of arrow keys was inconsistent with system behavior. So, I don't know if you also want these changes or not. I think only merging the original commit is not good for the reason above.

Martin Hering added 7 commits January 9, 2015 10:35
- fixed not sending mouse events up the responder chain when happend in cell
- added deselect of cells when mouse clicked in background
Unfortunately at least on OS X 10.10 [NSWindow _processKeyboardUIKey:] only implements moveLeft:, moveRight:, moveUp: and moveDown:. Everything else that is not supported by NSScrollView needs to be added manually
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.

2 participants