Review Request: fix 234407 - set minimum width for system settings icon view

Thomas Lübking thomas.luebking at gmail.com
Fri Jan 11 01:03:13 GMT 2013



> On Jan. 10, 2013, 11:47 p.m., Chao Feng wrote:
> > Screenshot: chinese after change
> > <http://git.reviewboard.kde.org>
> >
> >     Others looks good, I still think here it looks strange. Increase to 7 characters?
> 
> Yichao Yu wrote:
>     Increase to 7 characters will only make 8 the number of characters in the text that looks strange. (and in fact it is 7 characters with my font settings.)
>     This should be a different issue that may be solved by changing how word wrapping is done for short Chinese text in Qt instead of disabling word wrapping or increasing the limit to a magic value IMHO.
>

See my last comment at https://git.reviewboard.kde.org/r/108285/
Picking a random value will actually not do if the goal is to prevent "stupid" wrapping of single glyphs.
You'll have to reimplement the delegate painting and paint the rows omitting the cliprect and thus ignoring the maximum size for single remains.

The risc with this approach is overlapping text (what can be migitated by a 2em margin between elements) and it needs to be accomplished by a reasonable minimum width (to prevent a 2 or even 3 char wide column) but picking a random static minimum size will fail on item a in language b for absolutely sure.


- Thomas


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


On Jan. 10, 2013, 8:48 p.m., Xuetian Weng wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/108328/
> -----------------------------------------------------------
> 
> (Updated Jan. 10, 2013, 8:48 p.m.)
> 
> 
> Review request for kde-workspace, Ben Cooksley, Thomas Lübking, Chao Feng, and Yichao Yu.
> 
> 
> Description
> -------
> 
> Set minimum width for system settings icon view item depending on font. Since KFileItemDelegate doesn't provides setMinimumSize, we make a sub-class that can have a minimumSize. (Maybe should be add to kdelibs in the future?)
> 
> This fontHeight * 6 heuristic value works for all languages. CJK character is usually square (width = height) so this roughly means 6 CJK character, and 12 latin letter (height = width * 2), which will always look good.
> 
> To fengchao, I'm sorry if you feel I steal your job.. but I can't stop myself since I think I can fix it in 10 minutes..
> 
> 
> This addresses bug 234407.
>     http://bugs.kde.org/show_bug.cgi?id=234407
> 
> 
> Diffs
> -----
> 
>   systemsettings/icons/CMakeLists.txt 0830dd7 
>   systemsettings/icons/FileItemDelegate.h PRE-CREATION 
>   systemsettings/icons/FileItemDelegate.cpp PRE-CREATION 
>   systemsettings/icons/IconMode.cpp 37cfc4b 
> 
> Diff: http://git.reviewboard.kde.org/r/108328/diff/
> 
> 
> Testing
> -------
> 
> see screenshot.
> 
> 
> Screenshots
> -----------
> 
> english after change
>   http://git.reviewboard.kde.org/r/108328/s/1014/
> chinese after change
>   http://git.reviewboard.kde.org/r/108328/s/1015/
> chinese before change
>   http://git.reviewboard.kde.org/r/108328/s/1016/
> spanish after change
>   http://git.reviewboard.kde.org/r/108328/s/1017/
> spanish before change
>   http://git.reviewboard.kde.org/r/108328/s/1023/
> 
> 
> Thanks,
> 
> Xuetian Weng
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20130111/3a089893/attachment.htm>


More information about the kde-core-devel mailing list