mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
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.
This commit is contained in:
parent
516d5d29dc
commit
68149e380d
@ -51,7 +51,6 @@ void RenderButton::metrics(MetricsInfo &, Dimension & dim) const
|
|||||||
else
|
else
|
||||||
fm.rectText(text_, dim.wid, dim.asc, dim.des);
|
fm.rectText(text_, dim.wid, dim.asc, dim.des);
|
||||||
|
|
||||||
dim.wid += 2;
|
|
||||||
dim_ = dim;
|
dim_ = dim;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,9 +63,9 @@ void RenderButton::draw(PainterInfo & pi, int x, int y) const
|
|||||||
font.decSize();
|
font.decSize();
|
||||||
|
|
||||||
if (editable_) {
|
if (editable_) {
|
||||||
pi.pain.buttonText(x + 1, y, text_, font, renderState());
|
pi.pain.buttonText(x, y, text_, font, renderState());
|
||||||
} else {
|
} else {
|
||||||
pi.pain.rectText(x + 1, y, text_, font,
|
pi.pain.rectText(x, y, text_, font,
|
||||||
Color_commandbg, Color_commandframe);
|
Color_commandbg, Color_commandframe);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user