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

Add the option to specify scroll direction #23

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

Conversation

ruangchupa
Copy link

Added scrollDirection parameter which defines the direction of scrolling behaviour.
If not provided, the vertical scrolling behaviour will be used.

Squashed commits:
[38234d4] Updated README.md
[5ab0717] Set ScrollDirection enum as public
[abe7b3f] Fixed ScrollDirection enum
[386f277] Removed accidentally added colons
[3c54a3c] Use scrollDirection instead of scrollable parameter
[0b520c1] Set scrollable initialization to init scrollable parameter
[5831c5f] Added scrollable initialization with value true
[fd01b01] Renamed scrollAxes to self.scrollAxes
[0d036f8] Fixed incorrect variable names
@karolkulesza
Copy link
Collaborator

karolkulesza commented Jan 26, 2020

Hi there,

Thanks for contributing! However, when I tried to verify this feature by specifying scrollDirection in QGridTestApp's PeopleView (as .horizontal), the app was freezing at launch, with the following CPU report:

Screenshot 2020-01-26 at 13 06 17

Are you able to address it on QGridTestApp side as well? I wouldn't like to merge/publish something which does not work in the test app.

@ruangchupa
Copy link
Author

@karolkulesza Hey there, thanks for the review. Anyway, I couldn't reproduce the problem you've described. According to my experiments, the CPU usage always normal on the test app. Could you tell me the Xcode version you're using? I'm using the latest version of Xcode.

However, I added another commit to remove default block on the switch case statement as it will never be executed.

@karolkulesza
Copy link
Collaborator

Thanks. Could you also please explain what is the purpose of such feature assuming the current implementation of the sample PeopleView? After specifying scrollDirection as .horizontal the grid still grows vertically, not horizontally, as the number of columns is fixed. The only outcome for the test app is that there are now horizontal scroll indicators.

Alternatively, could you please provide the full use case for this feature? (With a sample code using QGrid with .horizontal scrollDirection)

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.

None yet

2 participants