Abdelrazak Younes wrote: >>> Sure, IIUC ideally we should test if the inset just fits inlined with >>> the button or not. But the reference width here should be the >>> textwidth_, not the screen width (think about deeply nested stuff). >> >> Previsouly we had (rev 14161): >> >> openinlined_ = textdim_.wid + 2 * dim.wid <= mi.base.textwidth; >> >> Probably the wide() thing was interfering badly with that. Might be a >> good idea to come back to the old formula now. Martin, would you care to >> comment? > > I've tested the code above and couldn't see a flaw even with deeply > nested insets where the button is barely visible. Result of the > investigation: it works fine even without the additional refit! I also > tested tables and I could not reproduce the symptoms described in the log:
In fact seems almost correct ;-) [ I still don't get the 2 * but probably it's a safety margin to account for all TEXT_TO_INSET_OFFSET and such. One could even try to put the exact dimension painted in ::draw ] > Fix "inset in tabular cell sticks out over cell border" bug > > So, I just put the old code back so that we can test it out extensively > as it seems to me this is the right thing to do. Martin, please don't > hesitate to touch this stuff again if you think you there is a flaw. > > Thanks for pushing me Alfredo, My pleasure ;-) You're doing a nice work. A/