5.3.201: Method= Font(12.0f, Font::plain) size= Font(10.0f, Font::italic) Group= Font(14.0f, Font::plain) Group children= Font(10.0f, Font::italic)
5.6.30: Method= fNormal, size=fSmall Group=fNormal
const AttributedString CtrlrLuaMethodEditor::getDisplayString(const ValueTree &item) const
{
AttributedString str;
// 5.6.30 original
// Font fNormal = owner.getOwner().getFontManager().getDefaultNormalFont();
// Font fSmall = owner.getOwner().getFontManager().getDefaultSmallFont();
// Back to 5.3.201...
Font fNormal = Font(12.0f, Font::plain);
Font fMedium = Font(14.0f, Font::plain);
Font fSmall = Font(10.0f, Font::plain);
Font fSmallItalic = Font(10.0f, Font::italic);
if (item.getType () == Ids::luaMethod)
{
Colour text;
if ((bool)item.getProperty(Ids::luaMethodValid) == false)
text = Colours::red;
else
text = Colours::black;
str.append (item.getProperty(Ids::luaMethodName).toString()+"\n", fNormal, text);
if ((int)item.getProperty(Ids::luaMethodSource) == CtrlrLuaMethod::codeInFile)
{
// str.append(File::descriptionOfSizeInBytes(owner.getLuaMethodSourceFile(&item).getSize()), fSmall, text.brighter(0.2f));
str.append(File::descriptionOfSizeInBytes(owner.getLuaMethodSourceFile(&item).getSize()), fSmallItalic, text.brighter(0.2f));
}
else
{
str.append (File::descriptionOfSizeInBytes (item.getProperty(Ids::luaMethodCode).toString().length()), fSmall, text.brighter(0.2f));
}
str.setJustification (Justification::left);
}
if (item.getType() == Ids::luaMethodGroup)
{
// str.append(item.getProperty(Ids::name), fNormal, Colours::black);
str.append(item.getProperty(Ids::name), fMedium, Colours::black);
str.append (" ["+String(item.getNumChildren())+"]", fSmall, Colours::darkgrey);
str.setJustification (Justification::left);
}
if (item.getType() == Ids::luaManagerMethods)
{
str.append ("LUA", fMedium.boldened(), Colours::black);
str.setJustification (Justification::left);
}
return (str);
}