]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathMacroTemplate.C
This commit saves the need to check for lyx::use_gui in a number of places.
[lyx.git] / src / mathed / MathMacroTemplate.C
index 32e7bc885bb2192d8f397f9a258335d93f5cff4d..b546e76720d74e8317c7f90681a1fed9108d8e45 100644 (file)
@@ -21,8 +21,6 @@
 #include "lyxlex.h"
 #include "LColor.h"
 
-#include "frontends/Application.h"
-#include "frontends/FontLoader.h"
 #include "frontends/FontMetrics.h"
 #include "frontends/Painter.h"
 
@@ -119,7 +117,7 @@ void MathMacroTemplate::metrics(MetricsInfo & mi, Dimension & dim) const
        cell(1).metrics(mi);
        docstring dp = prefix();
        dim.wid = cell(0).width() + cell(1).width() + 20
-               + theApp->fontLoader().metrics(mi.base.font).width(dp);
+               + theFontMetrics(mi.base.font).width(dp);
        dim.asc = std::max(cell(0).ascent(),  cell(1).ascent())  + 7;
        dim.des = std::max(cell(0).descent(), cell(1).descent()) + 7;
        dim_ = dim;
@@ -158,7 +156,7 @@ void MathMacroTemplate::draw(PainterInfo & p, int x, int y) const
        docstring dp = prefix();
        pi.pain.text(x + 2, y, dp, font);
        // FIXME: Painter text should retain the drawn text width
-       x += theApp->fontLoader().metrics(font).width(dp) + 6;
+       x += theFontMetrics(font).width(dp) + 6;
 
        int const w0 = cell(0).width();
        int const w1 = cell(1).width();