Review Request: kfileplaceeditdialog lineedit too small

Christoph Feck christoph at maxiom.de
Wed Oct 5 13:16:23 BST 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/102751/#review7119
-----------------------------------------------------------


Setting the width to "30+needed" looks wrong, too. This means depending on the current URL, it could grow very big, or be too small.

What I do in those cases is decide about a "good average" text length (for bookmarked Places URLs this could be 40 chars), then use "fontMetrics.height() * chars / 2" as its width hint, because the average height of a font is twice it's width. This also works good for CJK fonts, where each character is usally as wide as it is tall, but where you need less characters to write the same.

- Christoph Feck


On Oct. 4, 2011, 8:02 p.m., Greg T wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/102751/
> -----------------------------------------------------------
> 
> (Updated Oct. 4, 2011, 8:02 p.m.)
> 
> 
> Review request for Dolphin and kdelibs.
> 
> 
> Description
> -------
> 
> Hi, this patch sets a minimum size for the widget. 
> 
> 
> This addresses bug 266435.
>     http://bugs.kde.org/show_bug.cgi?id=266435
> 
> 
> Diffs
> -----
> 
>   kfile/kfileplaceeditdialog.cpp d798b4d 
> 
> Diff: http://git.reviewboard.kde.org/r/102751/diff/diff
> 
> 
> Testing
> -------
> 
> it's working
> 
> 
> Thanks,
> 
> Greg T
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20111005/8e790256/attachment.htm>


More information about the kde-core-devel mailing list