Skip to content

Wrap ListView and GridView in ScrolledWindow #120

New issue

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

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

Already on GitHub? # to your account

Merged
merged 2 commits into from
Mar 15, 2024
Merged

Conversation

Rirusha
Copy link
Contributor

@Rirusha Rirusha commented Mar 13, 2024

The demo did not work correctly: when creating more than 200 widgets and scrolling down, widgets are not dynamically created. Each Gtk.ListView or Gtk.GridView should be placed in Gtk.ScrolledWindow without intermediaries (Scrolling from Adw.StatusPage will not work)

The demo did not work correctly: when creating more than 200 widgets and scrolling down, widgets are not dynamically created. Each `Gtk.ListView` or `Gtk.GridView` should be placed in `Gtk.ScrolledWindow` without intermediaries (Scrolling from `Adw.StatusPage` will not work)
@Rirusha Rirusha requested a review from sonnyp as a code owner March 13, 2024 20:00
Copy link
Contributor

@sonnyp sonnyp left a comment

Choose a reason for hiding this comment

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

Thanks!

This needs a bit more work / attention to detail :)

I see 2 issues

The whole content shifting upwards when adding first new items:

Screencast.from.2024-03-13.23-41-30.mp4

The content width changing

Screencast.from.2024-03-13.23-44-42.mp4

If you revert unrelated changes - that probably fixes them
Please also double check that all properties on ScrolledWindow are necessary

@Rirusha
Copy link
Contributor Author

Rirusha commented Mar 13, 2024

Done. 🫡

@Rirusha
Copy link
Contributor Author

Rirusha commented Mar 14, 2024

I also wanted to ask, how welcome is changing the code of an existing demo? That is, I could add text output with "widget loaded/unloaded at position n" and add 500 instead 3 default widgets. One of the features of ListView/GridView is the display of a huge amount of content without hitting performance.

@Rirusha Rirusha requested a review from sonnyp March 14, 2024 23:20
@sonnyp
Copy link
Contributor

sonnyp commented Mar 15, 2024

how welcome is changing the code of an existing demo?

if it's an improvement go for it

I could add text output with "widget loaded/unloaded at position n" and add 500 instead 3 default widgets. One of the features of ListView/GridView is the display of a huge amount of content without hitting performance.

That's an improvement 👍

@sonnyp sonnyp changed the title Fix List View Widgets demo List View Widgets: Wrap ListView and GridView in ScrolledWindow Mar 15, 2024
@sonnyp sonnyp changed the title List View Widgets: Wrap ListView and GridView in ScrolledWindow Wrap ListView and GridView in ScrolledWindow Mar 15, 2024
Copy link
Contributor

@sonnyp sonnyp left a comment

Choose a reason for hiding this comment

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

Thanks!

Feel free to add yourself to Workbench contributors in about.js

@sonnyp sonnyp merged commit c32bb20 into workbenchdev:main Mar 15, 2024
Rirusha added a commit to Rirusha/Workbench that referenced this pull request Mar 15, 2024
sonnyp pushed a commit to workbenchdev/Workbench that referenced this pull request Mar 15, 2024
Hofer-Julian pushed a commit to workbenchdev/Workbench that referenced this pull request Mar 24, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants