(*** This bug was imported into bugs.kde.org ***) Package: kwin Version: KDE 3.0.0 Severity: wishlist Installed from: RedHat RPMs Compiler: Not Specified OS: Linux OS/Compiler notes: Not Specified I've wonder when there will be nautilus like selection and more beaty drag and drop current looks very ugly (Submitted via bugs.kde.org)
What is "Nautilus like selection"?
I believe he means the way in which nautilus draws the selection rectangle. With nautilus, WinXP, and Mac (I think), the area being selected is actually a transparent, colored-filled rectangle. KDE just has a dashed-line, unfilled rectangle. The effect is quite nice actually. The color of the rectangle is not completely flat though if i remember correctly. It has slight highlights on the edges to give it a polished, 3D look to it.
AFAIK, this is currently difficult without some nasty hacking due to the way QIconView handles selection. The relevant code is the following, both for erasing and drawing: p.begin( viewport() ); p.setRasterOp( NotROP ); p.setPen( QPen( color0, 1 ) ); p.setBrush( NoBrush ); drawRubber( &p ); d->dragging = TRUE; p.end(); The NotROP basically means that the black pixels drawn invert the selection. this is called first to remove the old rectangle and then to draw the new one. drawRubber *is* virtual, but to implement it access to the private d->rubber is required; and I don't see an accessor. The default implementation calls drawPrimitive with PE_FocusRect for the current style, so a custom implementation can be put in place without much hacking (basically by looking for the NotROP). However, this requires some nasty hacking, as far as I can see, to keep track of the state of the blended-in rectangle without having the benefit of access to the widget's data structures describing things like the scrolling going on, if any (It's easy in the non-scrolled case) it. Everyone should feel free to prove me wrong however ;-). Of course, KIconView can probably reimplement the selection drag entirely, but that's probably extremely complicated. P.S.: It'd be quite appreciated if users didn't change the assignments incorrectly after they've been adjusted by a developer. KWin has absolutely nothing to do with this.
A long time ago I made an accidental change to the bug by reassigning to kwin -- I'm guessing it still has nothing to do with this (??) sorry :-/ But anyhow, now that some time has passed, is the drawing of the selection rectangle (and the corresponding painting of the icons) still too complex to accomplish this? Perhaps it's not too late to influence the development of the next QT version as well.
Subject: Re: see http://lists.kde.org/?l=kde-devel&m=107623938426476&w=2 for a patch
*** Bug 40567 has been marked as a duplicate of this bug. ***
*** This bug has been confirmed by popular vote. ***
The selection (rubberband) has been implemented some time ago. It is available on both KDE3 and KDE4. About drag n' drop, if you don't like how are implemented on KDE4, please report it against plasma product. Thanks!