How to display the insert index when sorting manually (Tasks applet)
Marco Martin
notmart at gmail.com
Tue Mar 17 16:16:00 CET 2009
On Tuesday 17 March 2009, Christian Mollekopf wrote:
> On Mon, 16 Mar 2009 17:28:33 -0600, "Aaron J. Seigo" <aseigo at kde.org>
>
> said:
> > On Monday 16 March 2009, Christian Mollekopf wrote:
> > > On Monday 16 March 2009 18:14:33 Aaron J. Seigo wrote:
> > > > On Sunday 15 March 2009, Christian Mollekopf wrote:
> > > > > Therefore i suggest using a cursor like bar to display the insert
> > > > > index.
> > > >
> > > > probably much easier would be to simply adjust the drawing of the
> > > > item itself rather than inserting a whole new item and managing the
> > > > layout issues.
> > > >
> > > > so if this is a "regular" item:
> > > >
> > > > [ icon title ]
> > > >
> > > > a spacer drop would be:
> > > >
> > > > [ ] [icontitle]
> > >
> > > But how would this look with a vertical taskbar?
> >
> > the item would likely increase its size vertically and pain the
> > indicator.
> >
> > > > the layout would still see it as one item because, well, it would be.
> > > >
> > > > the beauty of this approach is:
> > > >
> > > > * you don't need to coordinate multiple items, each AbstractTaskItem
> > > > just handles its own dragEnter/dragHover/dragLeave events
> > > >
> > > > * the layout is completely uninvolved in the process
> > >
> > > Currently the whole logic is in taskGroupItem, so only expanded tasks
> > > accept the drag*events.
> >
> > that's fine. the items can also react to them, but then pass the event on
> > unaccepted.
> >
> > > I think i will stick to displaying a bar on the insert index if there
> > > aren't any objections.
> >
> > this is inconsistent with how other items in the plasma desktop shell
> > work and
> > is pretty old school. you'll also run into "doesn't fit" issues in edge
> > cases,
> > and painting it in the abstract item should be perfectly feasible.
>
> So should each item display a bar inside the task, or shouldn't there be
> any bar and only the text moves a bit away form the edge?
>
> While i think it would be a bit harder to implement than the current
> approach, i'm absolutely willing to change the code if you think it
> would be more consistent or somehow better (unfortunately i didn't get
> it yet, exept only implementation consistency is meant =P).
>
> atm. it's the expanded group which receives all dragMoveEvents, checks
> which index or item has to be highlighted and handles also all the
> actual grouping/sorting stuff.
>
> The bar is displayed by adding a QGraphicsWidget directly to the scene()
> instead of inserting it into the layout. This has the advantage that it
> doesn't make the whole operation "nervous" since nothing moves.
>
> have a look at http://tinypic.com/view.php?pic=2mm7oti&s=5 if you wan't
> to see how it looks atm.
to me as it is it looks pretty good
perhaps i a bit less noticeable that whaen i did propose that look but we'll
find something
> I know the cursors is a bit tiny, but this can be improved.
> You can see a spacer at the bottom right, which was inserted where i
> took the task from.
> One task to the left you can see a tiny white bar which is supposed to
> be the insertIndex highlighter =)
>
> > --
> > Aaron J. Seigo
> > humru othro a kohnu se
> > GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
> >
> > KDE core developer sponsored by Qt Software
>
> _______________________________________________
> 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