Review Request: kfileplaceeditdialog lineedit too small

Greg T yellowcake- at gmx.net
Wed Oct 5 19:23:24 BST 2011



> On Oct. 5, 2011, 12:16 p.m., Christoph Feck wrote:
> > 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.

Thank you for your kind explanation. I hope I have understood you right.


- Greg


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


On Oct. 5, 2011, 6:22 p.m., Greg T wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/102751/
> -----------------------------------------------------------
> 
> (Updated Oct. 5, 2011, 6:22 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/4229904b/attachment.htm>


More information about the kde-core-devel mailing list