mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-01 21:45:23 +00:00
Use a plain font in macro edit box
Without this, the font would be mathcal in a mathcal environment. Additionally, set the font size to tiny when computing metrics too.
This commit is contained in:
parent
cdc9176949
commit
1c1b3519f9
@ -585,8 +585,8 @@ void MathMacro::metrics(MetricsInfo & mi, Dimension & dim) const
|
|||||||
// calculate dimension with label while editing
|
// calculate dimension with label while editing
|
||||||
if (lyxrc.macro_edit_style == LyXRC::MACRO_EDIT_INLINE_BOX
|
if (lyxrc.macro_edit_style == LyXRC::MACRO_EDIT_INLINE_BOX
|
||||||
&& d->editing_[mi.base.bv]) {
|
&& d->editing_[mi.base.bv]) {
|
||||||
FontInfo font = mi.base.font;
|
FontInfo font;
|
||||||
augmentFont(font, "lyxtex");
|
font.setSize(FONT_SIZE_TINY);
|
||||||
Dimension namedim;
|
Dimension namedim;
|
||||||
mathed_string_dim(font, name(), namedim);
|
mathed_string_dim(font, name(), namedim);
|
||||||
#if 0
|
#if 0
|
||||||
@ -776,8 +776,7 @@ void MathMacro::draw(PainterInfo & pi, int x, int y) const
|
|||||||
|
|
||||||
if (drawBox) {
|
if (drawBox) {
|
||||||
// draw header and rectangle around
|
// draw header and rectangle around
|
||||||
FontInfo font = pi.base.font;
|
FontInfo font;
|
||||||
augmentFont(font, "lyxtex");
|
|
||||||
font.setSize(FONT_SIZE_TINY);
|
font.setSize(FONT_SIZE_TINY);
|
||||||
font.setColor(Color_mathmacrolabel);
|
font.setColor(Color_mathmacrolabel);
|
||||||
Dimension namedim;
|
Dimension namedim;
|
||||||
|
Loading…
Reference in New Issue
Block a user