]> git.lyx.org Git - features.git/commitdiff
Remove extra spacing around InsetCommand buttons
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 23 May 2016 14:16:05 +0000 (16:16 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 1 Jun 2016 11:34:05 +0000 (13:34 +0200)
There is already a spacing of 2 pixels on each side of a button (e.g.
collapsed inset). There is no need to add one extra pixel for command
insets.

Fixes part of bug #10149.
(cherry picked from commit 68149e380daad42bac69de5984ef1e21508d9cb3)

src/insets/RenderButton.cpp
status.22x

index 06fc653da731ae3cb8d7a2c8f062aecc7606a636..ee1b1f44cd04326aafa2ae8d631873cb9520622b 100644 (file)
@@ -51,7 +51,6 @@ void RenderButton::metrics(MetricsInfo &, Dimension & dim) const
        else
                fm.rectText(text_, dim.wid, dim.asc, dim.des);
 
-       dim.wid += 2;
        dim_ = dim;
 }
 
@@ -64,9 +63,9 @@ void RenderButton::draw(PainterInfo & pi, int x, int y) const
        font.decSize();
 
        if (editable_) {
-               pi.pain.buttonText(x + 1, y, text_, font, renderState());
+               pi.pain.buttonText(x, y, text_, font, renderState());
        } else {
-               pi.pain.rectText(x + 1, y, text_, font,
+               pi.pain.rectText(x, y, text_, font,
                                 Color_commandbg, Color_commandframe);
        }
 }
index f942de533fefda43409903cc231e1a8539dc5e8f..a059cc1ada22e2d7f948e60cbd804321750c2636 100644 (file)
@@ -90,6 +90,7 @@ What's new
 - Shortcut preferences: don't forget to trigger the search when it is
   initialized with the previous value.
 
+- Remove extra spacing around  button insets (bug 10149).
 
 * INTERNALS