]> git.lyx.org Git - lyx.git/blobdiff - src/insets/RenderButton.cpp
Context menu item to add unknown branch (rest of #7643)
[lyx.git] / src / insets / RenderButton.cpp
index 434f44e1085b1bac58544bb5ca87fe9a6fe0ab31..06fc653da731ae3cb8d7a2c8f062aecc7606a636 100644 (file)
@@ -41,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);
@@ -51,7 +51,7 @@ void RenderButton::metrics(MetricsInfo &, Dimension & dim) const
        else
                fm.rectText(text_, dim.wid, dim.asc, dim.des);
 
-       dim.wid += 4;
+       dim.wid += 2;
        dim_ = dim;
 }
 
@@ -59,14 +59,14 @@ 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);
+       FontInfo font = sane_font;
        font.setColor(Color_command);
        font.decSize();
 
        if (editable_) {
-               pi.pain.buttonText(x + 2, y, text_, font, renderState());
+               pi.pain.buttonText(x + 1, y, text_, font, renderState());
        } else {
-               pi.pain.rectText(x + 2, y, text_, font,
+               pi.pain.rectText(x + 1, y, text_, font,
                                 Color_commandbg, Color_commandframe);
        }
 }