Review Request: Account for the SVG margins in FolderView::IconView::itemSize()

Ignat Semenov 13thguards at gmail.com
Thu Jan 19 20:34:06 UTC 2012



> On Jan. 19, 2012, 5:24 p.m., Aaron J. Seigo wrote:
> > small comment below, but looks ok otherwise.

I think qRound() should go away, as per diff r2, because the code for the size calc based on the icon size a few lines above does not do this. If we qRound() the sum of the margins, we could end up getting a pixel more than the first version. What do you think?


> On Jan. 19, 2012, 5:24 p.m., Aaron J. Seigo wrote:
> > plasma/applets/folderview/iconview.cpp, lines 1011-1012
> > <http://git.reviewboard.kde.org/r/103735/diff/3/?file=47478#file47478line1011>
> >
> >     hm can be cons. also, spaces around the + signs, please

Will do.


- Ignat


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


On Jan. 19, 2012, 2:38 p.m., Ignat Semenov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/103735/
> -----------------------------------------------------------
> 
> (Updated Jan. 19, 2012, 2:38 p.m.)
> 
> 
> Review request for Plasma, Aaron J. Seigo and Marco Martin.
> 
> 
> Description
> -------
> 
> Currently, the FolderView::IconView::itemSize() method accounts for the margins only if size.width()>ts.width(), that is, the icon+margins is wider than the text. However, when ts.width()>size.width(), the margins are not accounted for, and size.width()=ts.width(). This can be observed easily. The patch adds those margins to the second operand of the comparison macro.
> 
> 
> Diffs
> -----
> 
>   plasma/applets/folderview/iconview.cpp 09b9c80 
> 
> Diff: http://git.reviewboard.kde.org/r/103735/diff/diff
> 
> 
> Testing
> -------
> 
> Tested by manually changing the paintItem() code to use the itemSize() rect and observing the improved behaviour.
> 
> 
> Thanks,
> 
> Ignat Semenov
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20120119/bebbb0e1/attachment-0001.html>


More information about the Plasma-devel mailing list