if (parent_.editing(mi.base.bv) && label_.length() > 0) {
// grey
FontInfo font = sane_font;
- font.setSize(FONT_SIZE_TINY);
+ font.setSize(TINY_SIZE);
font.setColor(Color_mathmacrolabel);
// make space for label and box
if (parent_.editing(pi.base.bv) && label_.length() > 0) {
// grey
FontInfo font = sane_font;
- font.setSize(FONT_SIZE_TINY);
+ font.setSize(TINY_SIZE);
font.setColor(Color_mathmacrolabel);
// make space for label and box
void InsetMathMacroTemplate::metrics(MetricsInfo & mi, Dimension & dim) const
{
Changer dummy1 = mi.base.changeFontSet("mathnormal");
- Changer dummy2 = mi.base.font.changeStyle(LM_ST_TEXT);
+ Changer dummy2 = mi.base.font.changeStyle(TEXT_STYLE);
// valid macro?
MacroData const * macro = 0;
// FIXME: Calling Changer on the same object repeatedly is inefficient.
Changer dummy0 = pi.base.font.changeColor(Color_math);
Changer dummy1 = pi.base.changeFontSet("mathnormal");
- Changer dummy2 = pi.base.font.changeStyle(LM_ST_TEXT);
+ Changer dummy2 = pi.base.font.changeStyle(TEXT_STYLE);
Dimension const dim = dimension(*pi.base.bv);
return false;*/
// valid characters?
- for (size_t i = 0; i < n.size(); ++i) {
- if (!(n[i] >= 'a' && n[i] <= 'z')
- && !(n[i] >= 'A' && n[i] <= 'Z')
- && n[i] != '*')
- return false;
+ if (n.size() > 1) {
+ for (size_t i = 0; i < n.size(); ++i) {
+ if (!(n[i] >= 'a' && n[i] <= 'z')
+ && !(n[i] >= 'A' && n[i] <= 'Z')
+ && n[i] != '*')
+ return false;
+ }
}
return true;