]> git.lyx.org Git - features.git/commitdiff
Use a plain font in macro edit box
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 21 Feb 2017 10:47:05 +0000 (11:47 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 21 Feb 2017 10:49:12 +0000 (11:49 +0100)
Without this, the font would be mathcal in a mathcal environment.
Additionally, set the font size to tiny when computing metrics too.

src/mathed/MathMacro.cpp

index c3bbcabbf229e2fb47a9a60a7964aa2a873b2d84..4f478d0995f78c3c8226c3f1826136f52f9b4cdc 100644 (file)
@@ -585,8 +585,8 @@ void MathMacro::metrics(MetricsInfo & mi, Dimension & dim) const
                // calculate dimension with label while editing
                if (lyxrc.macro_edit_style == LyXRC::MACRO_EDIT_INLINE_BOX
                    && d->editing_[mi.base.bv]) {
-                       FontInfo font = mi.base.font;
-                       augmentFont(font, "lyxtex");
+                       FontInfo font;
+                       font.setSize(FONT_SIZE_TINY);
                        Dimension namedim;
                        mathed_string_dim(font, name(), namedim);
 #if 0
@@ -776,8 +776,7 @@ void MathMacro::draw(PainterInfo & pi, int x, int y) const
 
                if (drawBox) {
                        // draw header and rectangle around
-                       FontInfo font = pi.base.font;
-                       augmentFont(font, "lyxtex");
+                       FontInfo font;
                        font.setSize(FONT_SIZE_TINY);
                        font.setColor(Color_mathmacrolabel);
                        Dimension namedim;