-
-
Notifications
You must be signed in to change notification settings - Fork 75
Add example for dnd in a listbox with a listmodel #245
base: master
Are you sure you want to change the base?
Conversation
I still need to add more comments |
Nice :) I'll review once the comments are there, let me know! |
@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 { |
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
11f6395
to
d72ab86
Compare
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
d72ab86
to
2f979d5
Compare
@jsparber any updates? :) |
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