]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/Painter.C
Lars says _(_(b)) is a bug ... fix
[lyx.git] / src / frontends / Painter.C
index af127d5b3dd7040a9e2dd7accb0c63bfa53b914d..ec555e96242bc9eda6fa39f2d7656f3aeb06d724 100644 (file)
@@ -1,10 +1,12 @@
 /**
  * \file Painter.C
- * Copyright 1998-2002 the LyX Team
- * Read the file COPYING
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
  * \author unknown
- * \author John Levon <moz@compsoc.man.ac.uk>
+ * \author John Levon 
+ *
+ * Full author contact details are available in file CREDITS
  */
 
 #include <config.h>
@@ -67,9 +69,15 @@ Painter & Painter::rectText(int x, int baseline,
 
        font_metrics::rectText(str, font, width, ascent, descent);
  
-       rectangle(x, baseline - ascent, width, ascent + descent, frame);
-       fillRectangle(x + 1, baseline - ascent + 1, width - 1, 
-                     ascent + descent - 1, back);
+       if (back != LColor::none) {
+               fillRectangle(x + 1, baseline - ascent + 1, width - 1, 
+                             ascent + descent - 1, back);
+       }
+       if (frame != LColor::none) {
+               rectangle(x, baseline - ascent, width, ascent + descent, frame);
+       }
        text(x + 3, baseline, str, font);
        return *this;
 }