I'm reviewing the patch at this ticket:

  https://www.lyx.org/trac/ticket/12781

I like its feature and plan to commit it unless there's an objection. See the 
screenshot attached to the ticket to quickly understand the feature.

I had a question there about efficiency. Basically, for each function, if there 
does not exist an icon, a transparent icon is constructed in order to maintain 
correct alignment. I think it's kind of like using \phantom in LaTeX. My 
question is whether it's worth it to construct the placeholder icon once, 
rather than many times, since the placeholder icon does not depend on the 
function. My best guess is that I'm overthinking this and that it's not worth 
complicating the code and that the current patch is fine.

Out of curiosity, (even if it's decided above that efficiency is not a concern 
here), would it be reasonable to use std::call_once() here, as suggested in 
this answer: https://stackoverflow.com/a/24337463/1376404.

Scott

Attachment: signature.asc
Description: PGP signature

-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to