Review Request 109648: Implement the implicitWidth/implicitHeight of the chat plasmoid

David Edmundson david at davidedmundson.co.uk
Fri Mar 22 12:22:41 UTC 2013



> On March 21, 2013, 6:54 p.m., David Edmundson wrote:
> > I'm very much against shipping any patches if we don't know why it fixes it. From what I can see from declarative/declarativeitemcontainer.cpp it just sets the minimumWidth to it... which I would have thought it would be doing anyway when we set the minimumWidth.
> > 
> > Any documentation on implicitWidth, preferredWidth, minimumWidth and width would be incredibly useful. 
> > 
> > Given the proximity to the deadline and your testing I can't see this breaking anything, so ship it if you're confident with it.
> 
> Marco Martin wrote:
>     meh, browser ate my previous comment :/
>     i was saying: declarativeitemcontainer.cpp is used only when the item is in a Dialog (in the popup)
>     the root qml item is contained in a Plasma::DeclarativeWidget from libplasma
>     
>     the minimum/implicit/maximum sizes of the root qml item gets exported as minimumSize,preferredSize and maximumSize respectively of the qgraphicswidget, therefore minimum,preferred and maximum of the Applet that is in the linear layout of the panel.
>     
>     so, the documentation that applies is
>     http://qt-project.org/doc/qt-4.8/qgraphicslayoutitem.html
>     http://qt-project.org/doc/qt-4.8/qgraphicslinearlayout.html
>     
>     
>     basically minimum width: the layout will never resize the applet less than that, maximum width: the layout will never resize the applet more than that
>     
>     preferred (in qml they decided to rename it to implicit but same thing) the layout will try to give it that size, but will still give it a different size when needed
>     
>     so if as minimum, implicit and maximum you have 12, 56, 100 respectively, the layout will try to make it 56 pixels wide, but can decide to give it a different width, but never less than 12 and never more than 100
> 
> Aleix Pol Gonzalez wrote:
>     I'm still not convinced though about why does this solve the problem, since it's only aliasing the preferred sizes...
>     
>     Also I still have the problem that sometimes the Icon Tasks collapses my plasmoid into the minimum.
> 
> Marco Martin wrote:
>     it's not a problem, it's behaving exactly as you are telling it to...
>     
>     again, because it's the preferred size, you're asking to the panel qgraphicslinearlayout "please make me this width if you can" so usually solves the problem, becausethe panel can comply.
>     
>     in case the icon tasks grows to much, being that just a "preferred" the layout makes more space for the taskbar, shriking this applet as much it can, and as much it can is its "minimum size".
>     now, if you want your plasmoid to be a given size, never less never more without having the layout freedom to screw with it, you have to set a minimum width *and* a macimum width that are exactly the same

based on these comments it sounds like our preferredWidth property isn't doing anything.

So rather than aliasing like this patch does we should be just renaming the preferredWidth to implicitWidth.

Right?


- David


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/109648/#review29651
-----------------------------------------------------------


On March 21, 2013, 5:37 p.m., Aleix Pol Gonzalez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/109648/
> -----------------------------------------------------------
> 
> (Updated March 21, 2013, 5:37 p.m.)
> 
> 
> Review request for Plasma, Telepathy and David Edmundson.
> 
> 
> Description
> -------
> 
> Implements those 2 properties, aliasing to the similar preferredWidth/Height.
> 
> When I have Icon-Only tasks + Chat plasmoid in a panel, their growth rendered unpredictable. Implementing the implicit seems to solve this problem.
> 
> 
> Diffs
> -----
> 
>   chat/org.kde.ktp-chat/contents/ui/main.qml e11269e 
> 
> Diff: http://git.reviewboard.kde.org/r/109648/diff/
> 
> 
> Testing
> -------
> 
> I was reproducing the problem regularly since a couple of days, then now I cannot reproduce anymore.
> 
> There's no testing per se, though...
> 
> 
> Thanks,
> 
> Aleix Pol Gonzalez
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20130322/a0cd5ab6/attachment.html>


More information about the Plasma-devel mailing list