Usability of using icons to illustrate DnD

Zack Rusin zackrat at att.net
Sun Apr 28 16:35:11 BST 2002


On Saturday 27 April 2002 22:32, Ralf Nolden wrote:
> On Saturday 27 April 2002 23:00, Zack Rusin wrote:
>
> Zack, I gave this a second thought. The point why we can't see
> anything is just the icon size. Other environments display the icon
> half-transparent so you can see what's underneath; but nevertheless,
<snip>

I looked into it. Yes, I got a transparency in a drag object working. 
Good news - speed is not really an issue (at least on my 1gig athlon :) 
). The bad news - visual artifacts are worse than bad. The 
implementation: look at the dragdrop example in QT distribution, make 
it use the DragMoviePlayer, now in the updatePixmap method grabWindow, 
mask it with whatever you want and you're all set. Problems arise when 
you're trying to mask it against itself, which of course happens as 
soon as the updatePixmap is called again. So you have to hide it before 
you grabWindow and of course that has to propagate up because drag 
objects aren't painting themselves. The solution ( in a super loose 
sense of this word, because it hardly solves the problem) is brining 
the QShapedPixmapWidget from qtdnd_x11.cpp to a file of your choice and 
declaring extern QShapedPixmapWidget * qt_xdnd_deco; now in the 
updatePixmap call qt_xdnd_deco->hide(); to hide the icon and 
qt_xdnd_deco->show(); to show it after grabbing. It works fairly well 
for most occasions. The huge problem is that the text from all QT 
widgets isn't grabbed. Don't ask me why, the whole thing works very 
nicely when the icon is on top of my emacs but when put over any QT 
app, it grabs only the colors (no text or pixmaps). Beats my why. I got 
frustrated by it :)


Zack

-- 
Which is worse: Ignorance or Apathy?
Who knows? Who cares?





More information about the kde-core-devel mailing list