]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetBranch.cpp
Fix text frame drawing.
[lyx.git] / src / insets / InsetBranch.cpp
index c0a20430034459a410de44e316009734c1ac168e..e701da599f796e11392c8e32cebcbbbc8f4e8be4 100644 (file)
@@ -87,16 +87,13 @@ void InsetBranch::read(Buffer const & buf, Lexer & lex)
 {
        params_.read(lex);
        InsetCollapsable::read(buf, lex);
+       setLayout(buf.params());
        setButtonLabel();
 }
 
 
 void InsetBranch::setButtonLabel()
 {
-       Font font(Font::ALL_SANE);
-       font.decSize();
-       font.decSize();
-
        docstring s = _("Branch: ") + params_.branch;
        if (!params_.branch.empty()) {
                // FIXME UNICODE
@@ -105,9 +102,10 @@ void InsetBranch::setButtonLabel()
                        s = _("Undef: ") + s;
                }
        }
-       font.setColor(Color::foreground);
-       setLabel(isOpen() ? s : getNewLabel(s) );
-       setLabelFont(font);
+       if (decoration() == Classic)
+               setLabel(isOpen() ? s : getNewLabel(s) );
+       else
+               setLabel(params_.branch + ": " + getNewLabel(s));
 }
 
 
@@ -139,6 +137,7 @@ void InsetBranch::doDispatch(Cursor & cur, FuncRequest & cmd)
                InsetBranchParams params;
                InsetBranchMailer::string2params(to_utf8(cmd.argument()), params);
                params_.branch = params.branch;
+               setLayout(cur.buffer().params());
                setButtonLabel();
                break;
        }