How to display the insert index when sorting manually (Tasks applet)

Steven Blenkinsop steven099 at gmail.com
Sun Mar 15 16:38:47 CET 2009


On Sunday 15 March 2009 7:52:57 am Christian Mollekopf wrote:
> The first problem with the spacer is that if you drag a task over the
> taskbar, the whole thing starts to move. If you have one row thats okay and
> can be smoothened by using animations and  timers before showing the
> spacer. With several rows it's rather annoying because items at the end of
> the row jump to the beginning of the next row.

Just throwing this out there:

One problem with multiline taskbars and grouping is that line wrap. if your 
bar is grouped
xxxyyyyzz|
qqrrrrsss |    and you add a new 'x' task, you end up with

xxxxyyyyz|
zqqrrrrsss|   breaking the grouping

so, if wrapping happened like this:

xxxxyyyyz|>v| 
sssrrrrqqz|<<|  - around the outside

it would keep your groups together over multiple lines when rearranged, and 
would make the transition (especially if animated like the new qt tabbar) a 
lot smoother and easier to follow.

Of course this might not be the expected behaviour, and I'm not sure about 
implementation.

> The second problem is a bit harder to explain.
> Imagine a taskbar like this (S are sorting hitboxes and G are grouping
>
> hitboxes):
> |SGGS|SGGS|SGGS|
>
>  so as soon you drag a task over the S hitbox of an item the spacer is
>
> inserted:
> |SGGS|SPAC|SGGS|SGGS|
>
> If you drag your task now to the right because you actually want to group
> with item 2, the spacer dissapears and you mouse is immediatly over item 3
> instead of two.

As for the second problem, this is really random, but might work (if half 
spacers can exist in the layout that's being used, not sure how rigid it is):
Split the spacer in half, so rather than removing the spacer, just move half 
of it to the other side of item 2 (when the cursor is over item 2's left S 
hitbox, or the right "S hitbox" (the C) of the spacer), resulting in:

|SGGS|SP|SGGS|AC|SGGS|
Which would immediately place your mouse over one of the G hitboxes. item 3 
wouldn't move until after the drop. Overshooting to item2's right S hitbox 
would bring the expected result of
|SGGS|SGGS|SPAC|SGGS|
Again, not sure about implementation. If either (or both) is really stupid, 
feel free to ignore completely :)

> Therefore i suggest using a cursor like bar to display the insert index.

This would work too, it would just look a bit less dynamic, compared to the 
rest of plasma. However, if it seems to be the most elegant way of solving 
these problems, then it is also probably the best, for now.

~Steven

> Regards,
>
> Christian
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel at kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel



More information about the Plasma-devel mailing list