<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/103685/">http://git.reviewboard.kde.org/r/103685/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Plasma and Aaron J. Seigo.</div>
<div>By Ignat Semenov.</div>
<p style="color: grey;"><i>Updated Jan. 29, 2012, 12:17 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">With the iconshrink patch, I introduced an issue with the icon text clipping. The thing is, the iconview items painting code is written in a way that the text will accomodate fully only if the icon touches the top of the rect r (iconview.cpp:1050), else the text will get clipped. TO achieve this effect, Qt:AlignTop had been used. I changed that to Qt:AlignCenter and introduced the issue.
This patch tries to locate the icon at the top border of the rect r (as it had been before the commit), but when the icon shrinks, it moves towards its own center, same as the first commit.
ir.moveTop(r.top());
Now when the icon is shrinked, it is moved down by half the difference between its normal size and its shrinked size, which is perfectly logical.
ir.translate(0, (m_drawIconShrinked && m_pressedIndex == index) ? 0.05*option.decorationSize.height() : 0);
This centers the icon nicely around its own center. The text keeps "scaling" towards the top as well, as it had been before the commit. In the idle state, the text is accomodated fully, as it had been before the commit.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This is not final, there is 1 pixel offset bug in the halo drawing code. I'm going to sleep today, this review request is just to show that I'm aware that I have screwed things up and am working on getting the proper patch done.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>plasma/applets/folderview/iconview.cpp <span style="color: grey">(d295588)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/103685/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>