]> git.lyx.org Git - lyx.git/blobdiff - src/insets/RenderGraphic.cpp
pimpl not needed here
[lyx.git] / src / insets / RenderGraphic.cpp
index 42d2d776a4f68b53121468fad8049df88c13087e..dbc3fd21ff4a89d4ff7a6d90404d8763ff6d93c4 100644 (file)
@@ -15,7 +15,6 @@
 #include "insets/Inset.h"
 
 #include "gettext.h"
-#include "Color.h"
 #include "LyX.h"
 #include "LyXRC.h"
 #include "MetricsInfo.h"
@@ -152,21 +151,21 @@ void RenderGraphic::metrics(MetricsInfo & mi, Dimension & dim) const
        } else {
                int font_width = 0;
 
-               Font msgFont(mi.base.font);
-               msgFont.setFamily(Font::SANS_FAMILY);
+               FontInfo msgFont(mi.base.font);
+               msgFont.setFamily(SANS_FAMILY);
 
                // FIXME UNICODE
                docstring const justname =
                        from_utf8(onlyFilename(params_.filename.absFilename()));
                if (!justname.empty()) {
-                       msgFont.setSize(Font::SIZE_FOOTNOTE);
+                       msgFont.setSize(FONT_SIZE_FOOTNOTE);
                        font_width = theFontMetrics(msgFont)
                                .width(justname);
                }
 
                docstring const msg = statusMessage(params_, loader_.status());
                if (!msg.empty()) {
-                       msgFont.setSize(Font::SIZE_TINY);
+                       msgFont.setSize(FONT_SIZE_TINY);
                        font_width = std::max(font_width,
                                theFontMetrics(msgFont).width(msg));
                }
@@ -202,15 +201,15 @@ void RenderGraphic::draw(PainterInfo & pi, int x, int y) const
                                  y - dim_.asc,
                                  dim_.wid - 2 * Inset::TEXT_TO_INSET_OFFSET,
                                  dim_.asc + dim_.des,
-                                 Color::foreground);
+                                 Color_foreground);
 
                // Print the file name.
-               Font msgFont = pi.base.font;
-               msgFont.setFamily(Font::SANS_FAMILY);
+               FontInfo msgFont = pi.base.font;
+               msgFont.setFamily(SANS_FAMILY);
                string const justname = onlyFilename(params_.filename.absFilename());
 
                if (!justname.empty()) {
-                       msgFont.setSize(Font::SIZE_FOOTNOTE);
+                       msgFont.setSize(FONT_SIZE_FOOTNOTE);
                        pi.pain.text(x + Inset::TEXT_TO_INSET_OFFSET + 6,
                                   y - theFontMetrics(msgFont).maxAscent() - 4,
                                   from_utf8(justname), msgFont);
@@ -219,7 +218,7 @@ void RenderGraphic::draw(PainterInfo & pi, int x, int y) const
                // Print the message.
                docstring const msg = statusMessage(params_, loader_.status());
                if (!msg.empty()) {
-                       msgFont.setSize(Font::SIZE_TINY);
+                       msgFont.setSize(FONT_SIZE_TINY);
                        pi.pain.text(x + Inset::TEXT_TO_INSET_OFFSET + 6,
                                     y - 4, msg, msgFont);
                }