Bug 226666 - Inline rename in Dolphin can have a very small input field
Summary: Inline rename in Dolphin can have a very small input field
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 16.12.2
Platform: Gentoo Packages Linux
: NOR wishlist
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords:
: 226694 227159 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-02-13 12:53 UTC by Daniel Scharrer
Modified: 2010-02-26 15:09 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch for KFileItemDelegate (1.08 KB, patch)
2010-02-15 14:17 UTC, Frank Reininghaus
Details
Patch for Dolphin (2.20 KB, patch)
2010-02-15 14:18 UTC, Frank Reininghaus
Details
Updated patch for KFID (1.26 KB, patch)
2010-02-17 18:15 UTC, Frank Reininghaus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Scharrer 2010-02-13 12:53:10 UTC
Version:            (using KDE 4.4.0)
OS:                Linux
Installed from:    Gentoo Packages

When the "Rename inline" option is activated, the line edit input field that appears when renaming is only as wide as the old file name, which can be very short. This can be annoying when the new file name is longer than the old one as only a very small portion of it is visible at once.

Wouldn't it be better if the line edit was as wide as the whole "Name" column OR dynamically expanded if entering a longer file name?
Comment 1 Frank Reininghaus 2010-02-13 13:47:02 UTC
Thanks for the report, I can confirm this.

> Wouldn't it be better if the line edit was as wide as the whole "Name" column
> OR dynamically expanded if entering a longer file name?

It was like that up to KDE 4.3.4. It seems that the small width of the "rename" field is a side effect of the fix for bug 217447 :-( 

Probably also related to bug 224511.
Comment 2 Frank Reininghaus 2010-02-14 15:48:57 UTC
*** Bug 226694 has been marked as a duplicate of this bug. ***
Comment 3 Frank Reininghaus 2010-02-15 14:17:46 UTC
Created attachment 40802 [details]
Patch for KFileItemDelegate

Up to now, KFileItemDelegate only supports setting a maximum size for the editor if the icon is above or below the text. This patch implements settings a maximum size if the icon is to the left or right of the text.
Comment 4 Frank Reininghaus 2010-02-15 14:18:49 UTC
Created attachment 40803 [details]
Patch for Dolphin

This patch for DolphinDetailsView makes use of my patch for KFileItemDelegate. It adjusts the maximum width for editing if

1. the width of the "Name" column is changed by the user, or

2. "Expandable Folders" is toggled (because the "+" takes some of the width of the "Name" column), or

3. the current item changes. This is needed because the width which is available for editing depends on the level in the folder hierarchy if "Expandable Folders" is enabled.
Comment 5 Frank Reininghaus 2010-02-15 14:19:51 UTC
CC'ing Fredrik (maintainer of KFileItemDelegate).

Fredrik, Peter: could you have a look at my patches? Maybe there is another way to do it, but I couldn't find one so far.
Comment 6 Peter Penz 2010-02-16 10:21:25 UTC
Frank, from my point of view both patches look good. Thanks for this! Please commit if Fredrik does not object. I think this should be backported to 4.4.x too.
Comment 7 Peter Penz 2010-02-16 11:40:09 UTC
*** Bug 227159 has been marked as a duplicate of this bug. ***
Comment 8 Fredrik Höglund 2010-02-16 20:12:55 UTC
The KFID patch looks good to me, except for one thing; the icon can or should be on the right side of the label when the layout is reversed.

The details view in Dolphin doesn't seem to be reversed when you run it with --reverse though, so I guess there's a bug somewhere.

But the code should still take this into account when it sizes and positions the editor.
Comment 9 Frank Reininghaus 2010-02-17 18:15:49 UTC
Created attachment 40878 [details]
Updated patch for KFID

> The KFID patch looks good to me, except for one thing; the icon can or should
> be on the right side of the label when the layout is reversed.

@Fredrik: If I understand that correctly, the QRect for the editor should be extended to the left in case that the decoration position is 'Right'? The updated patch does that :-)

I can't comment on the --reverse bug, but it seems it's unrelated to this issue. Is it OK to commit my patch to trunk and 4.4?
Comment 10 Frank Reininghaus 2010-02-22 19:09:55 UTC
SVN commit 1094407 by freininghaus:

Make it possible to set the maximum size for editing in
KFileItemDelegate also if the icon is not above or below the text.

CCBUG: 226666
CCMAIL: fredrik@kde.org


 M  +18 -4     kfileitemdelegate.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1094407
Comment 11 Frank Reininghaus 2010-02-22 19:10:50 UTC
SVN commit 1094408 by freininghaus:

Make it possible to set the maximum size for editing in
KFileItemDelegate also if the icon is not above or below the text.

This will be in KDE SC 4.4.1.

CCBUG: 226666


 M  +18 -4     kfileitemdelegate.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1094408
Comment 12 Frank Reininghaus 2010-02-22 19:22:14 UTC
SVN commit 1094416 by freininghaus:

Use the full width of the "Name" column of the Details View for
renaming items inline.

BUG: 226666


 M  +16 -0     dolphindetailsview.cpp  
 M  +5 -0      dolphindetailsview.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1094416
Comment 13 Frank Reininghaus 2010-02-22 19:25:09 UTC
SVN commit 1094418 by freininghaus:

Use the full width of the "Name" column of the Details View for
renaming items inline.

Fix will be in KDE SC 4.4.1.

CCBUG: 226666


 M  +16 -0     dolphindetailsview.cpp  
 M  +5 -0      dolphindetailsview.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1094418
Comment 14 Frank Reininghaus 2010-02-26 15:09:01 UTC
*** Bug 224511 has been marked as a duplicate of this bug. ***