-
Notifications
You must be signed in to change notification settings - Fork 173
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
Pattern and instrument drag & drop preview #1699
base: master
Are you sure you want to change the base?
Conversation
Tempted to refactor DropTargetKind and associated parameters to a new class... |
Nowadays all drumkits accessible in the Sound Library widget are loaded (without samples) and stored in the SoundLibraryDatabase. The absolute path to the kits folder serves as the key to access them. SoundLibraryPanel::m_drumkitRegister maps the labels shown in the Sound Library widgets to the keys of the SoundLibraryDatabase. E.g. https://github.com/hydrogen-music/hydrogen/blob/master/src/gui/src/SoundLibrary/SoundLibraryPanel.cpp#L478 |
I like it. But I have some remarks.
|
That's probably a more complex thing to implement. I just thought about it a little more. I like your solution and I definitely don't want to step in and tell what it should look like. Just a thought :). In other applications drag move and drag additions are rendered by highlighting the border between two columns. This would probably be way less work then moving notes around. Also, we should think in advance about how to display a drag replacement of an instrument with another one (it's on the TODO list). Maybe something like highlighting its borders similar to what is happening when right-clicking a instrument/pattern element. |
I've sort of sat on this one for a while because, while I liked the initial idea, when it came to actually using it for some aggressive instrument reshuffling, I didn't like the way it felt. It seemed too disorienting, and reflecting about it I think this was because it shows only the "after" result of the action, and the fact that instruments and patterns move only in fixed amounts doesn't actually convey much "movement" when the cursor moves to a different block. Maybe this could be fixed by highlighting the inserted/moved pattern or instrument as well, but on reflection I think showing a highlight at the drop site is actually better. |
Preview drag and drop operations in the
SongEditorPatternList
andPatternEditorInstrumentList
, rearranging the patterns (or instruments) in the list to the order which will be imposed if the drag is ended at that position.(For imports, an empy space is shown, since no details are available until they're loaded)