<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/120610/">https://git.reviewboard.kde.org/r/120610/</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 Gerald Young.</div>
<p style="color: grey;"><i>Updated Oct. 17, 2014, 2:53 a.m.</i></p>
<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;">Fixes Krita Bug 339870.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The issue was two fold. Firstly on krita/ui/tool/kis_tool_freehand.cc didn't respond well to slow dragging motions. The brush size can only increment in integer pixel values, but a slow dragging motion generates increments smaller than one pixel. These small increments get truncated once passed to brush settings and the drag motion is discarded. Solution was to accumulate the drag motion until it is higher than one pixel.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">A second problem was that KisDoubleSliderSpinBox would implicitly convert the provided qreal to an int value. This conversion works like the floor function, for example turning a 0.1 into a 0 value (ok) and turning a -0.1 value into a -1 value (not ok). This was the cause of the weird behavior where brush size would decrease even when dragging right slowly. Solution was to use qRound to avoid the implicit conversion.</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 doing shift+drag and size increases/decreases normally. Slow shift+dragging also increases/decreases the brush size properly. Tried also at high zoom ratios and also works as expected.</p></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>krita/ui/tool/kis_tool_freehand.cc <span style="color: grey">(76a0ce0)</span></li>
<li>krita/ui/widgets/kis_slider_spin_box.cpp <span style="color: grey">(f9a7fc0)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/120610/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>