]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/Painter.C
fix math fonts with LyX/Mac
[lyx.git] / src / frontends / Painter.C
index 3f6e6a7c55aa1b6a047324db16edc5d4f3172bec..323cc0e715f7a7a3a8426a240df1eb6c4701e5e3 100644 (file)
@@ -6,28 +6,30 @@
  * \author unknown
  * \author John Levon
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #include <config.h>
 
-
 #include "Painter.h"
-#include "lyxfont.h"
+#include "font_metrics.h"
 #include "WorkArea.h"
-#include "frontends/font_metrics.h"
+
+#include "LColor.h"
+#include "lyxfont.h"
 
 using std::max;
+using std::string;
+
 
-Painter & Painter::button(int x, int y, int w, int h)
+void Painter::button(int x, int y, int w, int h)
 {
        fillRectangle(x, y, w, h, LColor::buttonbg);
        buttonFrame(x, y, w, h);
-       return * this;
 }
 
 
-Painter & Painter::buttonFrame(int x, int y, int w, int h)
+void Painter::buttonFrame(int x, int y, int w, int h)
 {
        //  Width of a side of the button
        int const d = 2;
@@ -49,16 +51,14 @@ Painter & Painter::buttonFrame(int x, int y, int w, int h)
        x1[2] = x + w; y1[2] = (y + h - d);
        x1[3] = x + w; y1[3] = y;
        fillPolygon(x1, y1, 4, LColor::right);
-
-       return *this;
 }
 
 
-Painter & Painter::rectText(int x, int baseline,
+void Painter::rectText(int x, int baseline,
        string const & str,
        LyXFont const & font,
-       LColor::color back,
-       LColor::color frame)
+       LColor_color back,
+       LColor_color frame)
 {
        int width;
        int ascent;
@@ -76,11 +76,10 @@ Painter & Painter::rectText(int x, int baseline,
        }
 
        text(x + 3, baseline, str, font);
-       return *this;
 }
 
 
-Painter & Painter::buttonText(int x, int baseline,
+void Painter::buttonText(int x, int baseline,
        string const & str,
        LyXFont const & font)
 {
@@ -92,7 +91,6 @@ Painter & Painter::buttonText(int x, int baseline,
 
        button(x, baseline - ascent, width, descent + ascent);
        text(x + 4, baseline, str, font);
-       return *this;
 }