On Sat, Jun 29, 2013 at 12:29 PM, stefano franchi <stefano.fran...@gmail.com> wrote: > Andrew, Liviu, > > 1. I cannot find an InsetLayout for labels. > > 2. Even if I could find it what would I change the LabelString to? > Currently I see the full label name on screen . Say I have a long label: > "chap:This is the first chapter" And I want the inset to show only 2-3 chars > max. What would LabelString be set to? The description in the Customization > manual is "terse" to say the least: > > "LabelString What will be displayed on the button or elsewhere as the inset > label. Some inset types (TeX code and Branch) modify this label on the fly." > Good. And is it possible to somehow influence that modification "on the > fly"?
I know little about this but I think some are hardcoded. See, for example, the following commit: commit 7ec2721d188edb777e4a64ae6005ca1d9d77f77a Author: Jean-Marc Lasgouttes <lasgout...@lyx.org> Date: Tue Nov 20 23:38:38 2012 +0100 Show status of branches even when inset is closed diff --git a/src/insets/InsetBranch.cpp b/src/insets/InsetBranch.cpp index db047c2..efdeea5 100644 --- a/src/insets/InsetBranch.cpp +++ b/src/insets/InsetBranch.cpp @@ -106,11 +106,10 @@ docstring const InsetBranch::buttonLabel(BufferView const & bv) const docstring symb = docstring(1, char_type(master_selected ? 0x2714 : 0x2716)); if (inchild && master_selected != child_selected) symb += char_type(child_selected ? 0x2714 : 0x2716); - s = symb + s; if (decoration() == InsetLayout::CLASSIC) - return isOpen(bv) ? s : getNewLabel(s); + return symb + (isOpen(bv) ? s : getNewLabel(s)); else - return params_.branch + ": " + getNewLabel(s); + return symb + params_.branch + ": " + getNewLabel(s); } Best, Scott