<table><tr><td style="">romangg 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/D23798">View Revision</a></tr></table><br /><div><div><p>Reducing the screen area height makes it difficult to place outputs on top of each other. Making it a bit smaller is fine (and improving the logic of how much this it in comparison to overall kcm size) but I think this is too much. Alternatively the size of the outputs could be reduced.</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/D23798#inline-134814">View Inline</a><span style="color: #4b4d51; font-weight: bold;">GB_2</span> wrote in <span style="color: #4b4d51; font-weight: bold;">OutputPanel.qml:33</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;"><tt style="background: #ebebeb; font-size: 13px;">element.count > 1</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;">element</tt> or <tt style="background: #ebebeb; font-size: 13px;">model</tt> is not the whole model but only the current element of the model displayed by the view delegate. So it's a single element of the model without a count.</p>

<p style="padding: 0; margin: 8px;">What you need is to take the count on the overall model. As the OutputPanel is part of Panel you can use for example here <tt style="background: #ebebeb; font-size: 13px;">panelView.count</tt>. This way an additional getter is not required. Also you could use <tt style="background: #ebebeb; font-size: 13px;">OutputModel::rowCount</tt> as in: <tt style="background: #ebebeb; font-size: 13px;">kcm.outputModel.rowCount()</tt> (it is already Q_INVOKABLE, see <a href="https://doc.qt.io/qt-5/qabstractitemmodel.html#rowCount" class="remarkup-link" target="_blank" rel="noreferrer">docs</a>).</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R104 KScreen</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D23798">https://phabricator.kde.org/D23798</a></div></div><br /><div><strong>To: </strong>ngraham, romangg, VDG, KWin<br /><strong>Cc: </strong>filipf, ndavis, GB_2, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>