commit f97f849e5cdeae8f960207fab760eb66fbbfde42
Author: Jean-Marc Lasgouttes <[email protected]>
Date: Mon May 23 16:16:05 2016 +0200
Remove extra spacing around InsetCommand buttons
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)
diff --git a/src/insets/RenderButton.cpp b/src/insets/RenderButton.cpp
index 06fc653..ee1b1f4 100644
--- a/src/insets/RenderButton.cpp
+++ b/src/insets/RenderButton.cpp
@@ -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);
}
}
diff --git a/status.22x b/status.22x
index f942de5..a059cc1 100644
--- a/status.22x
+++ b/status.22x
@@ -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