D27481: Panel spacer that can center things

David Edmundson noreply at phabricator.kde.org
Tue Feb 25 14:36:51 GMT 2020


davidedmundson added inline comments.

INLINE COMMENTS

> broulik wrote in main.xml:15
> Please mention in the label what `-1` means

this needs doing

> main.qml:109
> +                if (root.horizontal) {
> +                    middleItemsHint += Math.max(child.Layout.minimumWidth, child.Layout.preferredWidth) + panelLayout.rowSpacing;
> +                } else {

If we're trying to recreate the size hint of RowLayout we need to include maximum size hints

> mart wrote in panelconfigview.cpp:115
> so, i need to add the second spacer at first position rather than the last.
> I don't think i can do this without a script, as i need to access  the qquickitem to actually set a position (well, i could by accessing the graphics object property,directly, like the script implementation is doing, but it would be uglier

Seems like Panel could benefit from some sort of...ContinamentLayoutManager?

Effectively we're evaluating what RowLayout evaluates by hand here anyway, it seems like the right path forward and worth investing time in. Though it can happen after this patch.

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D27481

To: mart, #plasma, #vdg
Cc: davidedmundson, davidre, broulik, ngraham, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200225/a00a9611/attachment-0001.html>


More information about the Plasma-devel mailing list