From 612af5c5f014b54a94b5adb0ccb7bb9cf619013e Mon Sep 17 00:00:00 2001 From: Martin Vermeer Date: Tue, 21 Aug 2007 21:29:13 +0000 Subject: [PATCH] inset configurability: ERT git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19702 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/layouts/stdinsets.inc | 11 +++++++++++ src/insets/InsetERT.cpp | 11 ++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/lib/layouts/stdinsets.inc b/lib/layouts/stdinsets.inc index 4c3af0837b..84fe393693 100644 --- a/lib/layouts/stdinsets.inc +++ b/lib/layouts/stdinsets.inc @@ -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 diff --git a/src/insets/InsetERT.cpp b/src/insets/InsetERT.cpp index c762062005..3a39b96a74 100644 --- a/src/insets/InsetERT.cpp +++ b/src/insets/InsetERT.cpp @@ -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(*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); } -- 2.39.2