Jean-Marc Lasgouttes wrote: > The code in IntextText::metrics does: > > // This can happen when a layout has a left and right margin, > // and the view is made very narrow. We can't do better than > // to draw it partly out of view (bug 5890). > if (mi.base.textwidth < 1) > mi.base.textwidth = 1; > > if (hasFixedWidth()) > tm.metrics(mi, dim, mi.base.textwidth); > else > tm.metrics(mi, dim); > > So (1) it is a nice place to set a minimum width and (2) it is possible to > condition on fixed-width insets. > >> I thought that zoom is already taken into account in the patch sent, e.g. >> button size is already calculated wrt zoom. > > I agree that in the case of boxes, button size makes sense. Then you can > put your code in InsetCollapsable::metrics :)
I can put it into InsetCollapsable for fixedwidth insets. For insettext I do not know what the minimum size should be because I have no button in API as you already know. Pavel