Bug 54760

Summary: file names not displayed completely in file dialog
Product: [Frameworks and Libraries] kio Reporter: Philippe Fremy <phil>
Component: kfileAssignee: Carsten Pfeiffer <pfeiffer>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: screenshot of the problem
Patch to implement dynamic column width

Description Philippe Fremy 2003-02-17 21:09:59 UTC
Version:            (using KDE KDE 3.1)
Installed from:    Gentoo Packages
Compiler:          gcc (GCC) 3.2.1 20021207 (Gentoo Linux 3.2.1-20021207)  
OS:          Linux

As you can see in the screenshots, the ellipsis appear in the middle of the name of the files, and there is still plenty of room, probably enough to display most of the file names.
Comment 1 Philippe Fremy 2003-02-17 21:11:18 UTC
Created attachment 980 [details]
screenshot of the problem
Comment 2 Carsten Pfeiffer 2003-02-17 21:45:41 UTC
Yes, I know about this problem for a long time and discussed this with 
Reggie (getting a "smart alignment/grid" mode to QIconView). Unfortunately, 
nothing happened. 
 
I'm eventually going to provide a KFileView based on QListBox to overcome 
that problem. 
 
Comment 3 Morten Hustveit 2003-02-18 17:14:43 UTC
Created attachment 986 [details]
Patch to implement dynamic column width

The attached patch was sent to me by Stephan Jaensch.  It implements the
requested feature with only minor changes to the code.	The maximum width is
arbitrarily chosen to 300 pixels, but it can be anything.  Each column's width
will depende on the width of the widest item in that column.  I've used it for
three weeks now, and it seems to work perfectly.
Comment 4 Carsten Pfeiffer 2003-02-19 07:16:01 UTC
Subject: kdelibs/kio/kfile

CVS commit by pfeiffer: 

much better spacing, as proposed by Stephan Jaensch
(for the thumbnail view, we need to keep the gridX tho)
Thanks!

CCMAIL: 54760-close@bugs.kde.org


  M +3 -2      kfileiconview.cpp   1.78


--- kdelibs/kio/kfile/kfileiconview.cpp  #1.77:1.78
@@ -111,5 +111,5 @@ KFileIconView::KFileIconView(QWidget *pa
     toolTip = 0;
     setResizeMode( Adjust );
-    setGridX( 160 );
+    setMaxItemWidth( 300 );
     setWordWrapIconText( false );
     setArrangement( TopToBottom );
@@ -495,5 +495,6 @@ void KFileIconView::slotSmallColumns()
         d->previews->setChecked( false );
     }
-    setGridX( 160 );
+    setGridX( -1 );
+    setMaxItemWidth( 300 );
     setItemTextPos( Right );
     setArrangement( TopToBottom );