On Fri, Mar 26, 2004 at 08:39:11PM +0100, Alfredo Braunstein wrote: > Andre Poenitz wrote: > > >> So: either we add an insetdim_ member in InsetCollapsable and store the > >> InsetText's dimension there, and we continue to overwrite dim_ (I have a > >> patch for this), > > > > InsetCollapsable's dim should be the dimension of the InsetCollapsable. > > It could be created by calling InsetText::metrics first and augmenting > > it afterwards. If the dim of the InsetText is really needed (why? > > There's a cache in LyXText, too...) it should be cached in some separate > > variable. > > That's what I meant with the paragraph above. > > > The alternative is the owner_ stuff. The solution now is certainly the > > smaller pile of .... > > Ok. > > What about the following patch?
Looks good. > I took the liberty of cleaning a bit the drawing part (solving effectively a > couple of off-by one problems we had for some time now). I... uh... had to > remove some parts which I didn't understand, like some astronomical > computations using TEXT_TO_INSET_OFFSET/2 and some +1 -2 +3 little games. Fine with me. > With the patch we add 1*TTIO on all four sides of the inset, and the > responsability to handle it is shifted to insetcollapsable. (I don't think > that the insettext on tables need it for instance). Would that be ok? Sure. Andre'