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

Wrong contentInsets when connected mouse #153

Open
m1entus opened this issue Dec 17, 2015 · 6 comments
Open

Wrong contentInsets when connected mouse #153

m1entus opened this issue Dec 17, 2015 · 6 comments

Comments

@m1entus
Copy link

m1entus commented Dec 17, 2015

If i connected mouse, then scrollView has wrong contentInset because of scroller, without mouse is fine.
zrzut ekranu 2015-12-17 o 21 55 20

@jwilling
Copy link
Owner

Have you set content inset on the scroll view, or do you just mean the bounds are off? Unfortunately I don't have a mouse to test with at the moment. You might want to check what the bounds is that is being used to calculate the layout in the -layout method in JNWCollectionViewFramework.m.

@m1entus
Copy link
Author

m1entus commented Dec 18, 2015

Bounds of the collectionView are fine, if i connect mouse then scroller is making some magic stuff and there is more space, and if i turn off mouse then it is relayouting and content is okay. I will debug it around weekend

@dani-mp
Copy link

dani-mp commented Jan 12, 2016

Hi, @m1entus, have you found the solution?

@m1entus
Copy link
Author

m1entus commented Jan 12, 2016

@jwilling Before connecting mouse:

(lldb) po self.collectionView.contentInsets
▿ NSEdgeInsets

  • top : 0.0
  • left : 0.0 { ... }
  • bottom : 0.0 { ... }
  • right : 0.0 { ... }

(lldb) po self.collectionView.contentSize
▿ CGSize

  • width : 151.0
  • height : 440.0

After connecting mouse:

(lldb) po self.collectionView.contentSize
▿ CGSize

  • width : 136.0
  • height : 440.0

(lldb) po self.collectionView.contentInsets
▿ NSEdgeInsets

  • top : 0.0
  • left : 0.0 { ... }
  • bottom : 0.0 { ... }
  • right : 0.0 { ... }

@danielmartinprieto No i haven't found because i didn't invastige to it

@m1entus
Copy link
Author

m1entus commented Jan 12, 2016

@danielmartinprieto http://stackoverflow.com/questions/15249563/force-nsscrollview-to-use-nsscrollerstyleoverlay-independently-from-input-device this solve issue, i added code to scrollView as a temporary solution

@m1entus
Copy link
Author

m1entus commented Jan 12, 2016

Ok found solution, preparing PR...

m1entus added a commit to m1entus/JNWCollectionView that referenced this issue Jan 12, 2016
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

No branches or pull requests

3 participants