<table><tr><td style="">Zren 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/D6188" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>So before my commit, it was only needing to do:</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);">qml: cellHeight iconHeight 108
qml: cellWidth iconWidth 92
qml: cellHeight iconHeight 108</pre></div>

<p>with no updates after the panel is added.</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">After my patch logs: <a href="https://gist.github.com/Zren/2272e7c5ad6e8ff8e65b3480cddb9910" class="remarkup-link" target="_blank" rel="noreferrer">https://gist.github.com/Zren/2272e7c5ad6e8ff8e65b3480cddb9910</a></li>
<li class="remarkup-list-item">With isRootView check logs: <a href="https://gist.github.com/Zren/e9ad15929d376a5dc828b5ce8a8eda7f" class="remarkup-link" target="_blank" rel="noreferrer">https://gist.github.com/Zren/e9ad15929d376a5dc828b5ce8a8eda7f</a></li>
<li class="remarkup-list-item">Code I mentioned above: <a href="https://gist.github.com/Zren/e9fa35350673da3cb1dde8e7bb44b28c" class="remarkup-link" target="_blank" rel="noreferrer">https://gist.github.com/Zren/e9fa35350673da3cb1dde8e7bb44b28c</a></li>
</ul>

<p>When the panel slides in, it seems to sometimes update at height=1979px, but it may skip that and just calculate at height=1050px (I have a 30px panel).</p>

<p>We could check if <tt style="background: #ebebeb; font-size: 13px;"> && scrollArea.viewportHeight > 0</tt> however that's still calculating the extra space a few times before the panel is added.</p>

<p><a href="https://gist.github.com/Zren/1d93dfb5e687e68732d470d26104bf6d" class="remarkup-link" target="_blank" rel="noreferrer">https://gist.github.com/Zren/1d93dfb5e687e68732d470d26104bf6d</a></p>

<p>Ideally we'd only want to calculate cellWidth/cellHeight once like it was before. seeing as how viewportHeight/viewportWidth is recalculated.</p>

<p>We could also wait for the scrollArea component to complete loading.</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);">PlasmaExtras.ScrollArea {
    id: scrollArea

    readonly property int viewportWidth: ready && viewport ? Math.ceil(viewport.width) : 0
    readonly property int viewportHeight: ready && viewport ? Math.ceil(viewport.height) : 0
    property bool ready: false
    Component.onCompleted: {
        ready = true
    }</pre></div>

<p>which brings us to this before the panels are added.</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);">qml: cellHeight iconHeight 108
qml: onCellHeightChanged 108
qml: cellWidth iconWidth 92
qml: onCellWidthChanged 92
qml: cellHeight iconHeight 108
qml: cellHeight iconHeight 108
qml: cellWidth iconWidth 92
qml: scrollArea.onCompleted
qml: cellWidth iconWidth 92
qml: cellHeight iconHeight 108
qml: cellHeight iconHeight 108
qml: cellWidth iconWidth 92
qml:     availableColumns 20.869565217391305  = containerSize / cellSize 1920 92
qml:     availableColumns 20  floored
qml:     allColumnSize 1840
qml:     extraSpace 80
qml:     extraSpacing 4
qml: cellWidth extraWidth 4
qml: onCellWidthChanged 96
qml: cellHeight iconHeight 108
qml:     availableColumns 10  = containerSize / cellSize 1080 108
qml:     availableColumns 10  floored
qml:     allColumnSize 1080
qml:     extraSpace 0
qml:     extraSpacing 0                                                                                                                                                                                                                                                        
qml: cellHeight extraHeight 0</pre></div>

<p>That seems good enough to me.</p>

<p>After the panels are added... I'm not sure what else to do. There isn't really a way to tell plasmoid.screenGeomertry is animating. As for the binding loops, I'd need to rewrite <a href="https://phabricator.kde.org/D6201" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;" rel="noreferrer">D6201</a> to get rid of the binding loops on the label without breaking other stuff.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R119 Plasma Desktop</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D6188" rel="noreferrer">https://phabricator.kde.org/D6188</a></div></div><br /><div><strong>To: </strong>Zren, hein<br /><strong>Cc: </strong>anthonyfieroni, broulik, plasma-devel, ZrenBot, spstarr, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart, lukas<br /></div>