<table><tr><td style="">mart 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/D29694">View Revision</a></tr></table><br /><div><div><p>I would like this class to be splitted in Templates/controls, so different styles could make it look slightly sifferent (or anyways easier for the app developer to make one that looks just slightly different)<br />
the root component should be a Control, with image/icon/initials in contentItem and background collor/border in background<br />
the one in templates would not have a background the one in controls would instantiate the one in templates and give it one.</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/D29694#inline-170415">View Inline</a><span style="color: #4b4d51; font-weight: bold;">avatar.cpp:34</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">const</span> <span class="n">QList</span><span style="color: #aa2211"><</span><span class="n">QColor</span><span style="color: #aa2211">></span> <span class="n">c_colors</span> <span style="color: #aa2211">=</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span class="n">QColor</span><span class="p">(</span><span style="color: #766510">"#e93a9a"</span><span class="p">),</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">would be nice to be somewhat theme-able, maybe with the controls/templates split</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/D29694#inline-170411">View Inline</a><span style="color: #4b4d51; font-weight: bold;">Avatar.qml:15</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">Rectangle</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span style="color: #aa4000">id: avatarRoot</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">should be a Control, with some stuff moved into background and some into contentItem<br />
there should be one in templates with no background and one here that instatiates the templates one and adds the background</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/D29694#inline-170412">View Inline</a><span style="color: #4b4d51; font-weight: bold;">Avatar.qml:28</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="p">}</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span style="color: #304a96">enum</span> <span style="color: #004012">InitialsMode</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">        <span style="color: #004012">UseInitials</span><span class="p">,</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">this is not really necessary, if one doesn't wasnt the initials, doesn't set a name.</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/D29694#inline-170409">View Inline</a><span style="color: #4b4d51; font-weight: bold;">Avatar.qml:52</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">    * Whether the button should always show the image; show the image if one is</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span style="color: #74777d">    * available and show initials when it is not; or always show initials.</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span style="color: #74777d">    */</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">enum values should be written and explained here</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/D29694#inline-170406">View Inline</a><span style="color: #4b4d51; font-weight: bold;">Avatar.qml:109</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">layer.enabled:</span> <span style="color: #000a65">true</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">        <span style="color: #aa4000">layer.effect:</span> <span style="color: #004012">OpacityMask</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">            <span style="color: #aa4000">maskSource:</span> <span style="color: #004012">mask</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">we now have a much more efficient component for that: ShadowedImage, which should be used instead</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/D29694#inline-170410">View Inline</a><span style="color: #4b4d51; font-weight: bold;">Avatar.qml:115</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="p">}</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span style="color: #004012">Rectangle</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">        <span style="color: #aa4000">color:</span> <span style="color: #766510">"transparent"</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">this looks like something that should be themeable</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/D29694#inline-170413">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kirigamiplugin.cpp:259</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">qmlRegisterSingletonType</span><span style="color: #aa2211"><</span><span class="n">AvatarPrivate</span><span style="color: #aa2211">></span><span class="p">(</span><span style="color: #766510">"org.kde.kirigami.private"</span><span class="p">,</span> <span style="color: #601200">2</span><span class="p">,</span> <span style="color: #601200">13</span><span class="p">,</span> <span style="color: #766510">"AvatarPrivate"</span><span class="p">,</span> <span class="p">[]</span> <span class="p">(</span><span class="n">QQmlEngine</span><span style="color: #aa2211">*</span><span class="p">,</span> <span class="n">QJSEngine</span><span style="color: #aa2211">*</span><span class="p">)</span> <span style="color: #aa2211">-></span> <span class="n">QObject</span><span style="color: #aa2211">*</span> <span class="p">{</span> <span style="color: #aa4000">return</span> <span style="color: #aa4000">new</span> <span class="n">AvatarPrivate</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 class="n">qmlRegisterType</span><span class="p">(</span><span class="n">componentUrl</span><span class="p">(</span><span class="n">QStringLiteral</span><span class="p">(</span><span style="color: #766510">"Avatar.qml"</span><span class="p">)),</span> <span class="n">uri</span><span class="p">,</span> <span style="color: #601200">2</span><span class="p">,</span> <span style="color: #601200">13</span><span class="p">,</span> <span style="color: #766510">"Avatar"</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">I don't like this, as even tough is called "private" is really public api as there isn't really any way to make a c++ type not accessible.<br />
nothing in that c++ class seems really to be necessary to be c++</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/D29694">https://phabricator.kde.org/D29694</a></div></div><br /><div><strong>To: </strong>cblack, Kirigami, VDG<br /><strong>Cc: </strong>mart, ratijastk, ngraham, filipf, plasma-devel, fbampaloukas, GB_2, domson, dkardarakos, apol, ahiemstra, davidedmundson<br /></div>