Make DnD from Library to Crates/Playlists easier to Aim

Bug #662057 reported by Phillip Whelan
38
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Wishlist
mutil

Bug Description

Change the Icon of what is being dragged when doing DnD from the Library (or any other place inside Mixxx) to Crates use a small placeholder icon of sorts instead of using the entire list of tracks that is selected. This would make aiming waaaaay easier. It would also make it easier to make out what destination you are actually dragging to is.

Tags: library dnd
Revision history for this message
jus (jus) wrote :

This sounds good.
I have a attached a universal list-like icon sample in the style of the existing library icons which could fit in here.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

This is either really easy, or it's a limitation of Qt

Changed in mixxx:
status: New → Confirmed
milestone: 1.10.0 → none
RJ Skerry-Ryan (rryan)
tags: added: dnd library
Revision history for this message
Tony Mason (tony-bge-atyrau) wrote :

Its a real issue when trying to drag selections, needs a quick fix

Revision history for this message
mutil (mutil) wrote :

I made a patch for this but it needs review and testing from someone more familiar with mixxx source code as I am fairly new in mixxx development and although this patch works (for me at least) I don't know if it is the "correct" way. It should be simpler to replace the text with an icon but as I couldn't find an easier way I implemented a mouseMoveEvent which finds the location column, add each item's location URL to a QMimedata and executes a QDrag with this mimedata.

Revision history for this message
mutil (mutil) wrote :

And this is an icon which is the same jus uploaded but smaller and with a white outline so it can be visible in dark background.

Revision history for this message
jus (jus) wrote :

Thanks for working on that mutil,
while i could not apply the patch on current lp:mixxx due to changes that where introduced meanwhile, i successfully tested the patch some weeks back.
It worked like a charme overall but i would suggest one small change:
* If you drag the selection from the library over elements in the sidebar where you can`t drop tracks ( e.g. BROWSE ) you get that "forbidden" sign next to the icon which is fine.
* OTOH if you drag the selection from the library over elements in the sidebar where you can drop tracks ( e.g. CRATES,PLAYLISTS,AUTODJ ) we should have the "plus" sign next to the icon which is currently not visible.

Hope you can update your patch against current trunk and add that small change.

Revision history for this message
mutil (mutil) wrote :

Hello jus and thanks for testing this,
I was able to apply the patch on trunk (rev. 2863) successfully,
so if something still gets wrong please describe the exact problem.

Anyway, I made a new bzr diff, with Qt::DropAction set to Qt::CopyAction,
that applies the 'plus' sign upon drag, as you suggested.

Let me know if it works and can be applied against current lp:mixxx once you re-test it.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Hey mutil,

Your patch is great! I do think you need to do the location lookup a little differently. Looking at the header data for a title that matches "Location" will not work when we localize to other languages.

From WTrackTableView, you can do something like this to get a track location from a QModelIndex:

TrackModel* trackModel = getTrackModel();

if (!trackModel) {
  return;
}

foreach (QModelIndex index, indices) {
  if (!index.isValid()) {
    continue;
  }
  QString location = trackModel->getTrackLocation(index);
   // ... the rest of the per-row processing
}

Jus, are you happy with the way the icon renders etc. with mutil's updates? If so, let's put this in the 1.10 beta.

Cheers,
RJ Ryan

jus (jus)
Changed in mixxx:
assignee: nobody → mutil (mutil)
status: Confirmed → In Progress
milestone: none → 1.10.0
Revision history for this message
jus (jus) wrote :

Updated patch is working (with en-us language setting ) and looks good , adding the icon to the icon-template later on.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Thanks jus,

mutil, do you want to make the changes I mentioned or shall I?

Also, how would you like your name listed in the contributor list once I commit your patch?

Revision history for this message
mutil (mutil) wrote :

Hey Ryan,
good catch, I hadn't thought about the localization issue at all.
So, here is the patch with the changes you suggested.
If you think it needs any additional changes, go ahead and modify it.

Furthermore, the name I would like to be listed in the contributor list is
my real name: Thanasis Liappis.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Excellent -- thanks! Added to lp:mixxx in r2871

Changed in mixxx:
status: In Progress → Fix Committed
RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/5589

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.