davidedmundson added inline comments.

INLINE COMMENTS

> mart wrote in itemcontainer.cpp:370
> I may be wrong but I think if one would do
> AppletsLayout {
> 
>   QtObject {}
> 
> }
> 
> that internal object wouldn't be parented and stay dangling otherwise?

AFAIK, QML created objects don't use QObject parent.

Instead there's a ref counting thing in the JS engine.

> mart wrote in itemcontainer.cpp:438
> This may be not necessary, depends the behavior we want.
> The test i did was with the system monitor, having it auto resize when one 
> adds a sensor seemed to look better...
> It depends from usability pov, if instead by design we say the size the user 
> manually put is more important and should be maintained if possible, then 
> this part would go.

If we want to use this in the panel/wherever we need ItemContainer to forward 
the full min/preferred/max sizes (with margins added) and have the 
LayoutManager be the one that takes this information and resizes the container.

IMHO it shouldn't resize itself, it should just emit sizeHintChanged

Then in AbstractLayoutManager we have a connect that does the current:

releaseSpace(item)
resizeFromSizeHints(item)
positionItem(item)

It then gives full absolute control to the manager, rather than it doing part 
and then the item doing part.

REPOSITORY
  R120 Plasma Workspace

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

To: mart, #plasma
Cc: davidedmundson, plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, 
ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart

Reply via email to