mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Revert "Give a 2 pixels space for markers around math objects"
This is not ready yet.
This reverts commit 5a3962958f
.
This commit is contained in:
parent
29fbd062cc
commit
1538a8352c
@ -49,16 +49,8 @@ namespace {
|
|||||||
|
|
||||||
int markerMargin(MathRow::Element const & e)
|
int markerMargin(MathRow::Element const & e)
|
||||||
{
|
{
|
||||||
switch(e.marker) {
|
return e.marker == InsetMath::MARKER
|
||||||
case InsetMath::MARKER:
|
|| e.marker == InsetMath::MARKER2;
|
||||||
case InsetMath::MARKER2:
|
|
||||||
case InsetMath::BOX_MARKER:
|
|
||||||
return 2;
|
|
||||||
case InsetMath::NO_MARKER:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
// should not happen
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -100,7 +92,7 @@ void drawMarkers(PainterInfo const & pi, MathRow::Element const & e,
|
|||||||
Dimension const dim = coords.getInsets().dim(e.inset);
|
Dimension const dim = coords.getInsets().dim(e.inset);
|
||||||
|
|
||||||
// the marker is before/after the inset. Necessary space has been reserved already.
|
// the marker is before/after the inset. Necessary space has been reserved already.
|
||||||
int const l = x + e.before - (markerMargin(e) > 0 ? 1 : 0);
|
int const l = x + e.before - markerMargin(e);
|
||||||
int const r = x + dim.width() - e.after;
|
int const r = x + dim.width() - e.after;
|
||||||
|
|
||||||
if (e.marker == InsetMath::BOX_MARKER) {
|
if (e.marker == InsetMath::BOX_MARKER) {
|
||||||
|
Loading…
Reference in New Issue
Block a user