[PATCH] Widget Padding
Lars Knoll
lars at trolltech.com
Tue Jul 16 12:21:57 BST 2002
> On Tuesday 16 July 2002 12:25, Germain Garand wrote:
> > Le Mardi 16 Juillet 2002 09:46, David Faure a écrit :
> > > A good example of why it's good to have new eyes look upon existing
> > > code ;-) Patch looks obviously right - I also found a third occurence
> > > of this error. Applied.
> >
> > Hello David :-)
>
> Hi Germain ;)
>
> > While I was there, I also encountered two similar code snippets in
> > render_applet.cpp (l.113 & 178) that look suspicious :
> >
> > m_widget->resize(m_width-marginLeft()-marginRight()-paddingLeft()-padding
> >Right(),
> > m_height-marginTop()-marginBottom()-paddingTop()-paddingBottom());
> >
> > I see no obvious reason why margins, which are normally an extrinsic
> > property, should be counted in the widget boundaries... and what about
> > the border edge?
Youre right. The khtml model, calculates m_width to include borders and
padding, but not margins. So it should basically be
m_widget->resize(m_width-borderLeft()-borderRight()-paddingLeft()-paddingRight(),
m_height-borderTop()-borderBottom()-paddingTop()-paddingBottom());
Cheers,
Lars
>
> Unfortunately I can apply obvious typo fixes, but I can't comment about any
> of the rendering code. I don't know anything about it. Dirk or Lars will
> comment, though, hopefully ;)
More information about the kfm-devel
mailing list