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 Drag and Drop in List(box) example #110

Open
imhemish opened this issue Feb 24, 2024 · 1 comment
Open

Add Drag and Drop in List(box) example #110

imhemish opened this issue Feb 24, 2024 · 1 comment

Comments

@imhemish
Copy link
Contributor

There are various cases for a drag and drop in list box. It is mostly used for a preference where the user needs to be asked, what should appear first, or what should be applied first in a list of actions. A prime example of this is how search entries in gnome overview should be ranked. There is a drag handle which can be dragged, while an extra menu in suffix of row provides a click option for moving up and down in cases where drag and drop is not available (like a keyboard only system)

some useful links:
https://discourse.gnome.org/t/drag-and-drop-items-in-gtk-listbox-with-gtk-4/9083
https://gitlab.gnome.org/GNOME/gnome-control-center/-/blob/main/panels/search/cc-search-panel.c?ref_type=heads (code where drag and drop functionality in search panel of gnome-control-center is implemented)

image

@sonnyp
Copy link
Contributor

sonnyp commented Mar 2, 2024

Checkout the "Drag and Drop" demo.

Discoverability isn't great, we should improve the search.

Also we could split into 2 demos

  1. Drag and Drop - with very simply code
  2. ListBox with reordering

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

2 participants