Attached.

- Martin

Index: src/insets/InsetERT.cpp
===================================================================
--- src/insets/InsetERT.cpp	(revision 19610)
+++ src/insets/InsetERT.cpp	(working copy)
@@ -53,11 +53,7 @@
 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 @@
 InsetERT::InsetERT(BufferParams const & bp, CollapseStatus status)
 	: InsetCollapsable(bp, status)
 {
+	setLayout(bp);
 	init();
 }
 
@@ -413,6 +410,7 @@
 	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 @@
 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);
 }
 
 
Index: lib/layouts/stdinsets.inc
===================================================================
--- lib/layouts/stdinsets.inc	(revision 19664)
+++ lib/layouts/stdinsets.inc	(working copy)
@@ -75,4 +75,15 @@
 	EndFont
 End
 
+InsetLayout ERT
+	LabelString           ERT
+	Font
+	  Color               latex
+	  Family              typewriter
+	EndFont
+	LabelFont
+	  Color               latex
+	  Size                Small
+	EndFont
+End
 

Reply via email to