Bug 299327 - Inline rename box uses wrong font size for layout
Summary: Inline rename box uses wrong font size for layout
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Unclassified
Component: view-engine: icons mode (show other bugs)
Version: 16.12.2
Platform: Compiled Sources Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-03 20:33 UTC by Christoph Feck
Modified: 2012-06-08 14:40 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.9.0


Attachments
Screenshot for rename box bug (105.77 KB, image/png)
2012-05-03 20:33 UTC, Christoph Feck
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Feck 2012-05-03 20:33:39 UTC
Created attachment 70839 [details]
Screenshot for rename box bug

When renaming an item, a text box appears in place of the file name. The text box is as big as the selected custom font, but the actual font in the box is the system default font.

When you are using a very small custom font, the editing box gets too small. It should either use the custom font in the box, or use the default font for computing the layout of the box.

Besides, I find it odd that I have to use inline rename, I prefer the dialog.
Comment 1 Peter Penz 2012-05-03 20:54:23 UTC
Thanks Christoph, I'll try to fix the font issue until the 4.9 release.

> Besides, I find it odd that I have to use inline rename, I prefer the dialog.

I initially has some quite ambitious plans for the inline-renaming:
- Offer a OK + Cancel button overlay
- Automatically expand the line horizontally so that the "wrapping" in the icons-view does not become an issue.
- Allow scrolling through the view even if you are in the renaming-mode.

However it turned out that this is far more tricky than I thought (mainly due to integrating traditional widgets inside QGraphicsView has some limitiations that are a problem: E.g. the context-menu of the editor would be clipped to the view-boundaries).

Anyhow: Could you please give me more input what you don't like with the inline-renaming? Is it the missing OK/Cancel button (at least I considered this as an issue) or the wrapping? But in the longterm I'd really like to maintain a proper working inline-renaming instead of having the dialog... Thanks!
Comment 2 Christoph Feck 2012-05-03 21:27:12 UTC
It is indeed the wrapping that makes longer names harder to edit. The keyboard handling is also odd. For example, pressing "End" moves the cursor to the beginning of the last "line", instead of to the end of the filename.
Comment 3 Peter Penz 2012-06-08 14:40:26 UTC
Git commit 2e057eb6e21fe850c101a1f2bedaffd986ffdf3a by Peter Penz.
Committed on 08/06/2012 at 16:39.
Pushed by ppenz into branch 'master'.

Inline renaming fixes

- Don't use an outdated KFileItem when renaming an item more than once
- Use the same font as the view
- Don't lose the focus when an editor-popup is shown
Related: bug 298883, bug 301253
FIXED-IN: 4.9.0

M  +6    -0    dolphin/src/kitemviews/kfileitemmodel.cpp
M  +1    -0    dolphin/src/kitemviews/kstandarditemlistwidget.cpp
M  +8    -3    dolphin/src/kitemviews/private/kitemlistroleeditor.cpp
M  +21   -4    dolphin/src/views/dolphinview.cpp
M  +1    -0    dolphin/src/views/dolphinview.h

http://commits.kde.org/kde-baseapps/2e057eb6e21fe850c101a1f2bedaffd986ffdf3a