intrinsic size of object (br33903)
David Faure
faure at kde.org
Wed Mar 2 12:43:10 GMT 2005
On Tuesday 15 February 2005 17:51, Koos Vriezen wrote:
> On Tue, Feb 15, 2005 at 03:05:53PM +0100, David Faure wrote:
> > On Friday 11 February 2005 14:18, Koos Vriezen wrote:
> > > On Fri, Feb 11, 2005 at 02:07:24PM +0100, David Faure wrote:
> > > > On Friday 11 February 2005 13:29, Koos Vriezen wrote:
> > > > > Anyway, some time ago Stephan add me to the CC list of br33903. So I
> > > > > guess to fix this for all kinds of kparts and w/o using the liveconnect
> > > > > extension, a signal in BrowserExtension is needed, where to the KHTMLPart
> > > > > is connected and doing something like the javascript does. Of course I
> > > > > can fix that. I something like that acceptable for khtml?
> > > >
> > > > I'm not following - which signal would you add to BrowserExtension?
> > >
> > > Something like we have already:
> > > /**
> > > * Ask the hosting application to resize the top level widget.
> > > */
> > > void resizeTopLevelWidget( int w, int h );
> > >
> > > But maybe we need two, or have a bool for that, that will tell khtml the
> > > difference between the intrinsic size and a 'normal' resize. First case
> > > should be ignored in case the object has width/height attributes already.
> > > Eg.
> > > void reizeWidget(int w, int h, bool intrinsic);
> >
> > This is about a part (e.g. java?) that is embedded into KHTMLPart, right?
Thinking about this - the signal sounds good. However it's up to the host to decide
whether to honour the resize request or not, so I would rename it to
void setIntrinsicSize( int w, int h );
or even, for a more Qt-like name,
void setContentsSize( int w, int h );
In the '<object type="image/png" WIDTH=50 HEIGHT=100></object>' case,
the host will just ignore that signal, otherwise it can use the information to resize
the object. Is that what's needed?
--
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kfm-devel
mailing list