]> git.lyx.org Git - lyx.git/blobdiff - src/insets/RenderButton.cpp
This should be the last of the commits refactoring the InsetLayout code.
[lyx.git] / src / insets / RenderButton.cpp
index 2656bd453da578c310d1b3aa41ba535f8521688a..9d080b8df747280ff186646094bb8afd94768e67 100644 (file)
@@ -12,7 +12,6 @@
 
 #include "RenderButton.h"
 
-#include "Color.h"
 #include "MetricsInfo.h"
 
 #include "frontends/FontMetrics.h"
@@ -42,7 +41,7 @@ void RenderButton::update(docstring const & text, bool editable)
 
 void RenderButton::metrics(MetricsInfo &, Dimension & dim) const
 {
-       Font font(Font::ALL_SANE);
+       FontInfo font = sane_font;
        font.decSize();
        frontend::FontMetrics const & fm =
                theFontMetrics(font);
@@ -60,15 +59,15 @@ void RenderButton::metrics(MetricsInfo &, Dimension & dim) const
 void RenderButton::draw(PainterInfo & pi, int x, int y) const
 {
        // Draw it as a box with the LaTeX text
-       Font font(Font::ALL_SANE);
-       font.setColor(Color::command);
+       FontInfo font = sane_font;
+       font.setColor(Color_command);
        font.decSize();
 
        if (editable_) {
                pi.pain.buttonText(x + 2, y, text_, font, renderState());
        } else {
                pi.pain.rectText(x + 2, y, text_, font,
-                                Color::commandbg, Color::commandframe);
+                                Color_commandbg, Color_commandframe);
        }
 }