mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 17:20:55 +00:00
Change only the shape and not the whole font, otherwise constructs
such as \mathbf{\hat{a}} would not be correctly rendered on screen. No status.16x entry is necessary, as this problem was introduced by the fix for bug #4565 in r34023. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@34304 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
168bafceb9
commit
7c0bda490e
@ -112,8 +112,10 @@ InsetMath::mode_type InsetMathDecoration::currentMode() const
|
||||
|
||||
void InsetMathDecoration::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
{
|
||||
FontSetChanger dummy(mi.base, currentMode() == TEXT_MODE ?
|
||||
"textnormal" : "mathnormal");
|
||||
bool const upshape = currentMode() == TEXT_MODE
|
||||
&& mi.base.font.color() == Color_math;
|
||||
ShapeChanger dummy(mi.base.font, upshape ?
|
||||
UP_SHAPE : mi.base.font.shape());
|
||||
|
||||
cell(0).metrics(mi, dim);
|
||||
|
||||
@ -134,8 +136,10 @@ void InsetMathDecoration::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
|
||||
void InsetMathDecoration::draw(PainterInfo & pi, int x, int y) const
|
||||
{
|
||||
FontSetChanger dummy(pi.base, currentMode() == TEXT_MODE ?
|
||||
"textnormal" : "mathnormal");
|
||||
bool const upshape = currentMode() == TEXT_MODE
|
||||
&& pi.base.font.color() == Color_math;
|
||||
ShapeChanger dummy(pi.base.font, upshape ?
|
||||
UP_SHAPE : pi.base.font.shape());
|
||||
|
||||
cell(0).draw(pi, x + 1, y);
|
||||
Dimension const & dim0 = cell(0).dimension(*pi.base.bv);
|
||||
|
Loading…
Reference in New Issue
Block a user