[Bug 67140] Icons placing is a nightmare (fwd)

Henry W. Miller hank at black-hole.com
Mon Mar 8 18:37:11 GMT 2004


Bug 67140 summery:
>But when you release the mouse button, the icon is _not_ placed in the
>place the shape was before but it goes a few pixels away... alignin icons
>becomes a real nightmare!

Note that this is two completely seperate patches, and not a single two
part patch.  Apply only one or the other.  Applying both will result in
the same problem, but in reverse.

konq_iconviewwidget.patch fixes the root cause, but I can't imangine
someone writing the code that I basicly backed out for no reason so I
don't recomend it, I'm sure IT WILL BREAK SOMETHING, but I don't know
what.

kdiconview.patch is more of a work around,  If it is applied, everything
that eventially inhierits from KonqIconViewWidget needs the same patch.
Ugly, but I'm reasonably confident it won't break something else.

I'm not longer sure where to go with these.  I offer them in hopes that
they will inspire someone who knows KDE better than me to make the right
fix.

-- 
Henry Miller       hank at black-hole.com

---------- Forwarded message ----------
Date: Mon, 8 Mar 2004 09:16:24 +0100
From: David Faure <faure at kde.org>
To: Henry Miller <hank at black-hole.com>
Subject: Re: [Bug 67140] Icons placing is a nightmare

> Created an attachment (id=4969)
>  --> (http://bugs.kde.org/attachment.cgi?id=4969&action=view)

You hit the khtml bug where typing an invalid filename would upload the
filename as text. Please resend the patch - to 67140 at bugs.kde.org or if
possible on kfm-devel at kde.org

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
-------------- next part --------------
Index: konq_iconviewwidget.cc
===================================================================
RCS file: /home/kde/kdebase/libkonq/konq_iconviewwidget.cc,v
retrieving revision 1.277
diff -u -3 -p -r1.277 konq_iconviewwidget.cc
--- konq_iconviewwidget.cc	20 Feb 2004 09:47:27 -0000	1.277
+++ konq_iconviewwidget.cc	1 Mar 2004 20:41:15 -0000
@@ -1127,7 +1127,7 @@ KonqIconDrag * KonqIconViewWidget::konqD
 {
     //kdDebug(1203) << "KonqIconViewWidget::konqDragObject" << endl;
 
-    QPoint offset(-10,-10);
+    QPoint offset(0,0); 
     KonqIconDrag * drag = new KonqIconDrag( dragSource );
     QIconViewItem *primaryItem = currentItem();
     // Append all items to the drag object
-------------- next part --------------
Index: kdiconview.cc
===================================================================
RCS file: /home/kde/kdebase/kdesktop/kdiconview.cc,v
retrieving revision 1.106
diff -u -3 -p -r1.106 kdiconview.cc
--- kdiconview.cc	26 Feb 2004 11:30:27 -0000	1.106
+++ kdiconview.cc	2 Mar 2004 01:48:55 -0000
@@ -1180,6 +1180,12 @@ void KDIconView::showEvent( QShowEvent *
 void KDIconView::contentsDropEvent( QDropEvent * e )
 {
     kdDebug(1204)<<"void KDIconView::contentsDropEvent( QDropEvent * e )\n";
+
+    QPoint offset = e->pos();
+    offset.setX(offset.x() + 10);
+    offset.setY(offset.y() + 10);
+    e->setPoint(offset);
+
     // mind: if it's a filedrag which itself is an image, libkonq is called. There's a popup for drops as well
     // that contains the same line "Set as Wallpaper" in void KonqOperations::asyncDrop
     bool isColorDrag = KColorDrag::canDecode(e);


More information about the kfm-devel mailing list