if (os.strikeoutMath()) {
if (os.ulemCmd() == WriteStream::UNDERLINE)
os << "\\raisebox{-\\belowdisplayshortskip}{"
- "\\lyxmathsout{\\parbox[b]{\\columnwidth}{";
+ "\\lyxmathsout{\\parbox[b]{\\linewidth}{";
else
- os << "\\lyxmathsout{\\parbox{\\columnwidth}{";
+ os << "\\lyxmathsout{\\parbox{\\linewidth}{";
} else if (os.ulemCmd() == WriteStream::UNDERLINE)
os << "\\raisebox{-\\belowdisplayshortskip}{"
- "\\parbox[b]{\\columnwidth}{";
+ "\\parbox[b]{\\linewidth}{";
else if (os.ulemCmd() == WriteStream::STRIKEOUT)
- os << "\\parbox{\\columnwidth}{";
+ os << "\\parbox{\\linewidth}{";
}
// reserve some space for marker.
dim.wid += 2;
-
- // make it at least as high as the current font
- int asc = 0;
- int des = 0;
- math_font_max_dim(mi.base.font, asc, des);
- dim.asc = max(dim.asc, asc);
- dim.des = max(dim.des, des);
}
}
+void InsetMathHull::drawMarkers(PainterInfo & pi, int x, int y) const
+{
+ ColorCode pen_color = mouseHovered(pi.base.bv) || editing(pi.base.bv)?
+ Color_mathframe : Color_mathcorners;
+ // If the corners have the same color as the background, do not paint them.
+ if (lcolor.getX11Name(Color_mathbg) == lcolor.getX11Name(pen_color))
+ return;
+
+ Inset::drawMarkers(pi, x, y);
+ Dimension const dim = dimension(*pi.base.bv);
+ int const t = x + dim.width() - 1;
+ int const a = y - dim.ascent();
+ pi.pain.line(x, a + 3, x, a, pen_color);
+ pi.pain.line(t, a + 3, t, a, pen_color);
+ pi.pain.line(x, a, x + 3, a, pen_color);
+ pi.pain.line(t - 3, a, t, a, pen_color);
+}
+
+
void InsetMathHull::drawBackground(PainterInfo & pi, int x, int y) const
{
Dimension const dim = dimension(*pi.base.bv);
}
InsetMathGrid::draw(pi, xmath + 1, y);
- drawMarkers2(pi, x, y);
+ drawMarkers(pi, x, y);
if (numberedType()) {
Changer dummy = pi.base.changeFontSet("mathrm");
{
// FIXME: set this in the textclass. This value is what the article class uses.
static Length default_indent(2.5, Length::EM);
- if (buffer().params().is_math_indent) {
+ if (display() != Inline && buffer().params().is_math_indent) {
Length const & len = buffer().params().getMathIndent();
if (len.empty())
return bv.inPixels(default_indent);
if (!cur.inMathed())
return;
odocstringstream os;
- cur.info(os);
+ cur.info(os, false);
cur.message(os.str());
/*
// write something to the minibuffer