<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/119945/">https://git.reviewboard.kde.org/r/119945/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#e0e0e0" width="100%" cellpadding="12" style="border: 1px gray solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<h1 style="margin: 0; padding: 0; font-size: 10pt;">This change has been discarded.</h1>
</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 Plasma.</div>
<div>By Vishesh Handa.</div>
<p style="color: grey;"><i>Updated Aug. 28, 2014, 2:39 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
plasma-framework
</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 the minimumWidth/Height of the attached Layout of the mainItem<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
would change. The following events would happen -</p>
<ul style="padding: 0;text-rendering: inherit;margin: 0 0 0 1em;line-height: inherit;white-space: normal;">
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">updateMinimumWidth is called<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
--> results in resizeEvent being called<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
--> results in syncMainItemToSize<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
--> results in slots connected to mainItem widthChanged<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
---> syncMainItemToSize + syncToMainItemSize being called a few more<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
times. It's not entirely apparent why at thist point.</li>
</ul>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This kind of logic is quite hard to follow and more importantly because<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
of the timers in the middle, an extra paint event is called. This means<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
the user can first see the window resize and then the item getting<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
resized.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This patch introduces a little bit of code duplication (can be fixed in<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
future commits) to clearly establish what updateMinimumWidth should be<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
doing -<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
<em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;"> disconnect signals to make sure mainItem's widthChange is not triggered<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
</em> update window size + item size + borders<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
* reposition if required</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The repositioning is useful as currently if a dialog becomes wider if<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
will not reposition itself and will overflow. With this patch we always<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
make sure the entire dialog is shown.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Minor Point: On testing without the patch the dialog does reposition<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
itself if it is not already overflowing. I suspect this is kwin moving<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
the window.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">A test called dialog_minWidthHeighRepositioning.qml can be used to see<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
how the change occurs before and after.</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>src/plasmaquick/dialog.h <span style="color: grey">(f207f88)</span></li>
<li>src/plasmaquick/dialog.cpp <span style="color: grey">(02271e4)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/119945/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>