<table><tr><td style="">broulik added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D11663">View Revision</a></tr></table><br /><div><div><p>Sweet</p></div></div><br /><div><strong>INLINE COMMENTS</strong><div><div style="margin: 6px 0 12px 0;"><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D11663#inline-58053">View Inline</a><span style="color: #4b4d51; font-weight: bold;">InlineMessage.qml:364</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">visible:</span> <span style="color: #004012">actionsLayout</span><span class="p">.</span><span style="color: #004012">overflowSet</span><span class="p">.</span><span style="color: #004012">findIndex</span><span class="p">(</span><span style="color: #aa4000">function</span><span class="p">(</span><span style="color: #004012">act</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">return</span> <span style="color: #004012">act</span> <span style="color: #aa2211">==</span> <span style="color: #004012">modelData</span><span class="p">})</span> <span style="color: #aa2211">></span> <span style="color: #aa2211">-</span><span style="color: #601200">1</span> <span style="color: #aa2211">&&</span> <span style="color: #004012">modelData</span><span class="p">.</span><span style="color: #004012">visible</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;"><tt style="background: #ebebeb; font-size: 13px;">findIndex</tt> is new in Qt 5.9</p>
<p style="padding: 0; margin: 8px;">[1] <a href="https://doc.qt.io/qt-5/qtqml-javascript-functionlist.html" class="remarkup-link" target="_blank" rel="noreferrer">https://doc.qt.io/qt-5/qtqml-javascript-functionlist.html</a></p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D11663#inline-58052">View Inline</a><span style="color: #4b4d51; font-weight: bold;">InlineMessage.qml:387</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">Component.onCompleted:</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #004012">contentItem</span><span class="p">.</span><span style="color: #004012">opacity</span> <span style="color: #aa2211">=</span> <span style="color: #004012">visible</span> <span style="color: #aa2211">?</span> <span style="color: #601200">1.0</span> <span style="color: #aa2211">:</span> <span style="color: #601200">0.0</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #004012">complete</span> <span style="color: #aa2211">=</span> <span style="color: #000a65">true</span><span class="p">;</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Note that <tt style="background: #ebebeb; font-size: 13px;">visible</tt> propagates recursively so when the component containing a default-visible message widget isn't shown this will still animate. But then I don't know if that's a thing and how to fix that..</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D11663#inline-58050">View Inline</a><span style="color: #4b4d51; font-weight: bold;">InlineMessage.qml:100</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span style="color: #74777d"> */</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #004012">property</span> <span style="color: #004012">string</span> <span style="color: #004012">icon</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Should this be a <tt style="background: #ebebeb; font-size: 13px;">var</tt> property so you could also pass a <tt style="background: #ebebeb; font-size: 13px;">QIcon</tt> or "QtQuick Controls Icon"?</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D11663#inline-58049">View Inline</a><span style="color: #4b4d51; font-weight: bold;">InlineMessage.qml:113</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span style="color: #74777d"> */</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #004012">property</span> <span style="color: #004012">bool</span> <span style="color: #aa4000">showCloseButton:</span> <span style="color: #000a65">false</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;"><tt style="background: #ebebeb; font-size: 13px;">KMessageWidget</tt> names it <tt style="background: #ebebeb; font-size: 13px;">closeButtonVisible</tt></p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D11663#inline-58044">View Inline</a><span style="color: #4b4d51; font-weight: bold;">InlineMessage.qml:127</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span style="color: #74777d"> */</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #004012">readonly</span> <span style="color: #004012">property</span> <span style="color: #004012">bool</span> <span style="color: #aa4000">animating:</span> <span style="color: #766510">"animating"</span> <span style="color: #aa4000">in</span> <span style="color: #004012">contentItem</span> <span style="color: #aa2211">&&</span> <span style="color: #004012">contentItem</span><span class="p">.</span><span style="color: #004012">animating</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;"><tt style="background: #ebebeb; font-size: 13px;">contentItem.hasOwnProperty("animating")</tt></p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D11663#inline-58046">View Inline</a><span style="color: #4b4d51; font-weight: bold;">enums.h:39</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span class="n">class</span> <span style="color: #a0a000">InlineMessageType</span> <span class="p">:</span> <span class="n">public</span> <span class="n">QObject</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span class="p">{</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">With Qt 5.8 this could become</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">namespace InlineMessageType
{
Q_NAMESPACE
enum Type {
...</pre></div>
<p style="padding: 0; margin: 8px;">with <tt style="background: #ebebeb; font-size: 13px;">qmlRegisterUncreatableMetaObject</tt><br />
(purely informational comment)</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D11663#inline-58048">View Inline</a><span style="color: #4b4d51; font-weight: bold;">enums.h:42</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">Q_OBJECT</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">Q_ENUMS</span><span class="p">(</span><span class="n">Type</span><span class="p">)</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;"><tt style="background: #ebebeb; font-size: 13px;">Q_ENUM</tt></p>
<p style="padding: 0; margin: 8px;">(also informational, the code around it does the same, could be cleaned up eventually)</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R169 Kirigami</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D11663">https://phabricator.kde.org/D11663</a></div></div><br /><div><strong>To: </strong>hein, Kirigami, mart<br /><strong>Cc: </strong>broulik, ngraham, plasma-devel, apol, davidedmundson, mart, hein<br /></div>