Skip to content

Instantly share code, notes, and snippets.

View JMoerman's full-sized avatar

Jonathan Moerman JMoerman

View GitHub Profile
@JMoerman
JMoerman / main.vala
Created April 29, 2017 10:10
port of https://blog.gtk.org/2017/04/23/drag-and-drop-in-lists/ with scrolling and more advanced drag and drop
using Gtk;
class DragListBox : ListBox {
private ListBoxRow? hover_row;
private ListBoxRow? drag_row;
private bool top = false;
private int hover_top;
private int hover_bottom;
private bool should_scroll = false;
private bool scrolling = false;