<table><tr><td style="">dfaure marked an inline comment as done.<br />dfaure added inline comments.
</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/D8421" rel="noreferrer">View Revision</a></tr></table><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/D8421#inline-35997" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">broulik</span> wrote in <span style="color: #4b4d51; font-weight: bold;">main.qml:4</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">Unused?</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Ah, yes. That was for "formFactor" as in <a href="https://techbase.kde.org/Development/Tutorials/Plasma5/QML2/GettingStarted#Minimum_size" class="remarkup-link" target="_blank" rel="noreferrer">https://techbase.kde.org/Development/Tutorials/Plasma5/QML2/GettingStarted#Minimum_size</a><br />
(which I had to fix so the syntax would parse).</p>

<p style="padding: 0; margin: 8px;">But I'm not sure if I need to handle form factors in this applet, and if so, how...</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/D8421#inline-35902" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">davidedmundson</span> wrote in <span style="color: #4b4d51; font-weight: bold;">main.qml:20</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">then use font metrics...<a href="http://doc.qt.io/qt-5/qml-qtquick-fontmetrics.html" class="remarkup-link" target="_blank" rel="noreferrer">http://doc.qt.io/qt-5/qml-qtquick-fontmetrics.html</a></p>

<p style="padding: 0; margin: 8px;">or in this Plasmoid case use Units.gridUnit * 40</p>

<p style="padding: 0; margin: 8px;">which is gonna be basically the same.</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Oh, cool, FontMetrics didn't exist in my first QML attempts.</p>

<p style="padding: 0; margin: 8px;">But yeah if plasmoids should fit a grid, I'll use the grid then.</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/D8421#inline-35996" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">broulik</span> wrote in <span style="color: #4b4d51; font-weight: bold;">main.qml:33</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">Does this need a <tt style="background: #ebebeb; font-size: 13px;">Layout.fillWidth: true</tt> and <tt style="background: #ebebeb; font-size: 13px;">Layout.fillHeight: true</tt>? The <tt style="background: #ebebeb; font-size: 13px;">TextField</tt> probably also needs <tt style="background: #ebebeb; font-size: 13px;">Layout.fillWidth</tt>?</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;"><tt style="background: #ebebeb; font-size: 13px;">Layout.fillHeight: true</tt> led to a 1-pixel-high webview, not good.</p>

<p style="padding: 0; margin: 8px;"><tt style="background: #ebebeb; font-size: 13px;">Layout.fillWidth: true</tt> is good, it means I don't duplicate the width anymore.</p>

<p style="padding: 0; margin: 8px;">OK, and doing that in the TextField makes the applet resize to the user's wishes, I see. Thanks.</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/D8421#inline-35907" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">davidedmundson</span> wrote in <span style="color: #4b4d51; font-weight: bold;">main.qml:37</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">it's a bit rubbish, but:</p>

<p style="padding: 0; margin: 8px;">zoom: Units.devicePixelRatio</p>

<p style="padding: 0; margin: 8px;">should sort out DPI.<br />
(not tested)</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;"><tt style="background: #ebebeb; font-size: 13px;">zoomFactor: units.devicePixelRatio</tt><br />
helped indeed, thanks.</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/D8421#inline-35903" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">davidedmundson</span> wrote in <span style="color: #4b4d51; font-weight: bold;">metadata.desktop:119</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">no it doesn't</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Indeed. One day it should, though, I'd like the user to be able to choose which dict to use. Do I have to write a config dialog in QML, though? If so, any example I can use for that?<br />
Or can it use widgets?</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/D8421#inline-35905" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">davidedmundson</span> wrote in <span style="color: #4b4d51; font-weight: bold;">dict_object.h:2</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">Plasma core provides a dataengine QML exposer.<br />
<a href="https://api.kde.org/frameworks/plasma-framework/html/classPlasma_1_1DataSource.html" class="remarkup-link" target="_blank" rel="noreferrer">https://api.kde.org/frameworks/plasma-framework/html/classPlasma_1_1DataSource.html</a></p>

<p style="padding: 0; margin: 8px;">Is there a reason we made a specialised QML wrapper? <br />
(not that I object to this)</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Ah, I didn't know.<br />
But I'd rather have as much logic as possible in C++, rather than in JS.<br />
The whole thing about listing dicts, and allowing the user to choose one (or more?), storing that in KConfig, and then using that for querying... I'm not sure but I think using DataSource directly wouldn't make this easy, I would still need a QObject at least for the KConfig part, and it would mean interfacing that with DataSource in JS code...</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R114 Plasma Addons</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D8421" rel="noreferrer">https://phabricator.kde.org/D8421</a></div></div><br /><div><strong>To: </strong>dfaure, Plasma<br /><strong>Cc: </strong>broulik, davidedmundson, plasma-devel, Plasma, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>