inset configurability: ERT

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19702 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Martin Vermeer 2007-08-21 21:29:13 +00:00
parent bb0f26bc05
commit 612af5c5f0
2 changed files with 15 additions and 7 deletions

View File

@ -75,4 +75,15 @@ InsetLayout Note:Shaded
EndFont
End
InsetLayout ERT
LabelString ERT
Font
Color latex
Family typewriter
EndFont
LabelFont
Color latex
Size Small
EndFont
End

View File

@ -53,11 +53,7 @@ using std::string;
void InsetERT::init()
{
setButtonLabel();
Font font(Font::ALL_SANE);
font.decSize();
font.decSize();
font.setColor(Color::latex);
setLabelFont(font);
setLabelFont(layout_.labelfont);
text_.current_font.setLanguage(latex_language);
text_.real_current_font.setLanguage(latex_language);
}
@ -66,6 +62,7 @@ void InsetERT::init()
InsetERT::InsetERT(BufferParams const & bp, CollapseStatus status)
: InsetCollapsable(bp, status)
{
setLayout(bp);
init();
}
@ -413,6 +410,7 @@ void InsetERT::draw(PainterInfo & pi, int x, int y) const
Font tmpfont = pi.base.font;
getDrawFont(pi.base.font);
pi.base.font.realize(tmpfont);
const_cast<InsetERT &>(*this).setButtonLabel();
InsetCollapsable::draw(pi, x, y);
pi.base.font = tmpfont;
}
@ -428,8 +426,7 @@ bool InsetERT::showInsetDialog(BufferView * bv) const
void InsetERT::getDrawFont(Font & font) const
{
font = Font(Font::ALL_INHERIT, latex_language);
font.setFamily(Font::TYPEWRITER_FAMILY);
font.setColor(Color::latex);
font.realize(layout_.font);
}