]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/Painter.C
fix tooltips in toolbar
[lyx.git] / src / frontends / Painter.C
index af127d5b3dd7040a9e2dd7accb0c63bfa53b914d..445a3493afbca75a62223c9d0199debebb94afa5 100644 (file)
@@ -67,9 +67,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 (frame != LColor::none) {
+               rectangle(x, baseline - ascent, width, ascent + descent, frame);
+       }
+       if (back != LColor::none) {
+               fillRectangle(x + 1, baseline - ascent + 1, width - 1, 
+                             ascent + descent - 1, back);
+       }
        text(x + 3, baseline, str, font);
        return *this;
 }