Review Request 110342: Dolphin Places: Make it easier to drag and drop items
Emmanuel Pescosta
emmanuelpescosta099 at gmail.com
Tue May 7 17:28:00 BST 2013
> On May 7, 2013, 2:18 p.m., Emmanuel Pescosta wrote:
> > > Hence this 'x' is now being set to 30% of the rectangle height.
> > Great Idea! Works great :)
> >
> > But I found a problem with your current patch when auto-activation is enabled, folders get activated while the drop indicator is shown.
> >
> > I changed your patch a little bit to fix this problem (removes some duplicated code too):
> > http://paste.kde.org/739226/
> >
> > What do you think about it?
>
> Vishesh Handa wrote:
> I wasn't too sure about the activation code. Do you know what this auto-activation is?
>
> If I'm not mistaken with your patch we would be sending signals to stop hovering and start hovering on each move. I'm not sure that's a good idea. Let me see what I can do.
> Do you know what this auto-activation is?
You can enable it in Settings -> Navigation -> Open folders during drag operations.
When you drag files/folders over items in the tab bar, Places Panel, Folders Panel or Dolphin View and stay there for a while, the folder under the current drag position will be opened.
> If I'm not mistaken with your patch we would be sending signals to stop hovering and start hovering on each move. I'm not sure that's a good idea. Let me see what I can do.
Yes you are right! Sorry my fault.
- Maybe we should add another function to KItemListView:
bool KItemListView::isDropIndicatorVisible() const
{
return !m_dropIndicator.isNull();
}
- Add a return to KItemListView::showDropIndicator():
if (isDropIndicatorVisible()) {
return 0;
}
- And add a return to KItemListController::dragMoveEvent() after "if (m_view->showDropIndicator(pos) >= 0) {"
if (m_view->isDropIndicatorVisible()) {
return false;
}
Thanks again for your work! Great to see such usability improvements. :)
- Emmanuel
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/110342/#review32198
-----------------------------------------------------------
On May 7, 2013, 10:45 a.m., Vishesh Handa wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/110342/
> -----------------------------------------------------------
>
> (Updated May 7, 2013, 10:45 a.m.)
>
>
> Review request for Dolphin.
>
>
> Description
> -------
>
> Dolphin Places: Make it easier to drag and drop items
>
> When doing a drop, a check is performed to see if it is within x pixels
> from the top or x pixel from the bottom of the rect. If it is, then the
> drop is considered a drop between items.
>
> This x was fixed to qMax( 4, myStyleOption.padding ) which would
> generally be 4. This is fine for some cases, but when the rectangle size
> increases then this 4 pixels is not enough. Hence this 'x' is now being
> set to 30% of the rectangle height.
>
> By default the rectangle height is 20 pixels, so x is now 6 instead of 4
> in the default case, which does make it slightly easier.
>
> Also, this in-between-items check is only performed when moving from one
> item to another. This is not good since if you enter the item and the
> bottom, the indicator is shown, and then as to start moving it up it
> stops showing, and then it should start showing again as you approach
> the top edge.
>
> Modified the code to run the check on every mouse drag event even if the
> hovered item has not changed.
>
> Both these changes combined make it much easier to drag and drop items.
>
>
> Diffs
> -----
>
> dolphin/src/kitemviews/kitemlistcontroller.cpp c6239df
> dolphin/src/kitemviews/kitemlistview.cpp a2629c5
>
> Diff: http://git.reviewboard.kde.org/r/110342/diff/
>
>
> Testing
> -------
>
> Much easier
>
>
> Thanks,
>
> Vishesh Handa
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20130507/3a155cf7/attachment.htm>
More information about the kfm-devel
mailing list