<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/124042/">https://git.reviewboard.kde.org/r/124042/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<div>Review request for Calligra.</div>
<div>By Stefano Bonicatti.</div>
<p style="color: grey;"><i>Updated June 20, 2015, 8:37 a.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</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;">Corrected spaces for an "if" and "switch". I will correct other "if" spaces in KoResourceItemChooser and KoResourceItemView for consistency on a separate commit to avoid cluttering this one.</pre>
</td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="http://bugs.kde.org/show_bug.cgi?id=344968">344968</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
calligra
</div>
<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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">When vertically resizing a KoResourceItemView and the vertical scrollbar appears, the tiles that represents the items are resized to fit the viewport with their width, but this also reduces their height making the scrollbar not needed again.
The scrollbar disappearing lets the viewport expand and so the tiles, in height, making the scrollbar needed again and this loops forever generating a considerable slowdown.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The fix consists in always showing the vertical scrollbar so that no resizing happens due to them.
This is extended also in the other cases, where rows are fixed and a horizontal scrollbar is used, or when scrollbar appearing should be dynamic.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">To avoid unnecessary work and event spam i've added check in KoResourceItemChooser::setSynced function if the value passed corresponds to its current status already.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Fixed also a small typo while i was at it.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Thanks to mmolch for pointing in the right direction with his patch.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Now this patch is on review not only because changes a calligra class, but because when a part of it was first proposed, it apparently still created some issues to the bug reporter, so it would be better to test it more.
krita-presetdockerflickering-bonicatti branch contains this patch.</p></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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Tested resizing in the special condition and had no flickering or performance hit.
The original bug reporter said that he was unable to properly resize the main krita window (with XFCE), but i had none of those problems (using KDE).</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> (updated)</h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>libs/widgets/KoResourceItemChooser.cpp <span style="color: grey">(6eb984c)</span></li>
<li>libs/widgets/KoResourceItemView.h <span style="color: grey">(3e0ae94)</span></li>
<li>libs/widgets/KoResourceItemView.cpp <span style="color: grey">(f933b9c)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/124042/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>