Summary: | Dragging and re-ordering favourites in kickoff is broken | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | David Edmundson <kde> |
Component: | Application Launcher (Kickoff) widget | Assignee: | Eike Hein <hein> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | hein, mklapetek, sebas |
Priority: | NOR | ||
Version: | master | ||
Target Milestone: | 1.0 | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/plasma-desktop/2d836eaa882342e8dc7c294468e14f8fd5519e89 | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | Kickoff favorites DND revamp |
Description
David Edmundson
2014-05-15 11:06:31 UTC
This works perfectly fine for me - can you tell me more about the containment context? It might be a coordinate mapping bug in the Plasma component. Related commit in kdeclarative: ebeb7d Reverting this^ fixes it, however: <Sho_> on the downside, reverting that will completely break dnd reordering in kicker <Sho_> because it gets bogus negative coordinates in the events <Sho_> so ... that mapping needs more investigation Assigning to me - I broke it, I shall fix it :) This isn't my fault after all; the delivered event coordinates are correct. Rather, the DND code in Kickoff has numerous bugs: - Calculates wrong coordinates for the drop target visualization and the drop row, because it doesn't take care of mapping to the list view's content item and works from a completely wrong delegate height. - Doesn't handle situations correctly where the drop row is adjacent to the source row. - A bunch of unnecessary vars. I'm working on rewriting it and will attach a patch for review soon. Created attachment 86650 [details]
Kickoff favorites DND revamp
This patch fixes various bugs in Kickoff favorites DND:
- Drop target viz positioning in general.
- Drop row calculation.
- Aborts drop handling if state after drag move isn't safe.
- Aborts drops into slots adjacent to the source item (and doesn't viz them).
However, Kickoff DND still has todos:
- Neither the old nor the new code attempts to handle drops into listview overflow (i.e. scrolling the view along). The new code at least aborts for safety instead of producing things like rendering the drop target viz above the tab bar.
- The drop target viz doesn't resize to stay within the viewport bounds when there's a scrollbar.
Someone else needs to pick up the baton on those, though.
I ended up addressing the above-mentioned todos as well, will commit shortly. Git commit 2d836eaa882342e8dc7c294468e14f8fd5519e89 by Eike Hein. Committed on 16/05/2014 at 02:42. Pushed by hein into branch 'master'. Fix various bugs in favorites DND. - Fix generally incorrect drop target viz positioning and when the view is scrolled. - Fix drop row calculation when the view is scrolled. - Don't offer no-op drops into adjacent slots. - Some additional safety checks. M +47 -20 applets/kickoff/package/contents/ui/FavoritesView.qml http://commits.kde.org/plasma-desktop/2d836eaa882342e8dc7c294468e14f8fd5519e89 |