Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Add example for dnd in a listbox with a listmodel #245

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jsparber
Copy link

This is an example for implementing a queue or anything where the user
can reader a list via dnd. This includes also some animation for hidding
and showing rows

@jsparber
Copy link
Author

I still need to add more comments

@sdroege
Copy link
Member

sdroege commented May 13, 2019

Nice :) I'll review once the comments are there, let me know!

@sdroege
Copy link
Member

sdroege commented Jun 19, 2019

@jsparber What's the status of this? Do you plan to update it? :) Would be nice to get this merged as nothing really is missing here apart from some comments from what I understand?

let index = row.get_index() as u32;
let alloc = row.get_allocation();

let index = if y < alloc.y + alloc.height/2 {
Copy link
Member

Choose a reason for hiding this comment

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

I believe you want to run cargo fmt once :)

Copy link
Member

Choose a reason for hiding this comment

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

Still seems like a good idea :)

Copy link
Author

Choose a reason for hiding this comment

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

apparently rustfmt doesn't fix the spaces, actually it doesn't change the file add all

Copy link
Member

Choose a reason for hiding this comment

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

That's curious. Don't worry about that then, I'll take a look once the code is done

w.draw(&g);

//TODO fix positioning
//https://stackoverflow.com/questions/24844489/how-to-use-gdk-device-get-position
Copy link
Member

Choose a reason for hiding this comment

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

Might be worth to ask someone who knows GTK well to go through these FIXME/TODO comments :)

Copy link
Author

Choose a reason for hiding this comment

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

Those are there because i didn't had time to do it. But are actually not that complicated.

Copy link
Member

Choose a reason for hiding this comment

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

Let's wait until that is done before merging then?

This is an example for implementing a queue or anything where the user
can needs to rorder a list via dnd. This includes also some animation
for hidding and showing rows
@sdroege
Copy link
Member

sdroege commented Sep 12, 2019

@jsparber any updates? :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants