updated icon font and added gracenote icons
This commit is contained in:
parent
dfd63def93
commit
3d52a14fe8
8 changed files with 42 additions and 9 deletions
Binary file not shown.
|
@ -47,6 +47,8 @@ public:
|
|||
virtual QString partStyleFilePath() const = 0;
|
||||
virtual void setPartStyleFilePath(const QString& path) = 0;
|
||||
|
||||
virtual std::string iconsFontFamily() const = 0;
|
||||
|
||||
virtual draw::Color defaultColor() const = 0;
|
||||
virtual draw::Color invisibleColor() const = 0;
|
||||
virtual draw::Color lassoColor() const = 0;
|
||||
|
|
|
@ -94,6 +94,11 @@ void EngravingConfiguration::setPartStyleFilePath(const QString& path)
|
|||
settings()->setSharedValue(PART_STYLE_FILE_PATH, Val(path.toStdString()));
|
||||
}
|
||||
|
||||
std::string EngravingConfiguration::iconsFontFamily() const
|
||||
{
|
||||
return uiConfiguration()->iconsFontFamily();
|
||||
}
|
||||
|
||||
Color EngravingConfiguration::defaultColor() const
|
||||
{
|
||||
return Color::black;
|
||||
|
|
|
@ -43,6 +43,8 @@ public:
|
|||
QString partStyleFilePath() const override;
|
||||
void setPartStyleFilePath(const QString& path) override;
|
||||
|
||||
std::string iconsFontFamily() const override;
|
||||
|
||||
draw::Color defaultColor() const override;
|
||||
draw::Color invisibleColor() const override;
|
||||
draw::Color lassoColor() const override;
|
||||
|
|
|
@ -24,12 +24,16 @@
|
|||
#include "rw/xml.h"
|
||||
#include "property.h"
|
||||
|
||||
#include "log.h"
|
||||
|
||||
using namespace mu;
|
||||
using namespace mu::draw;
|
||||
|
||||
namespace Ms {
|
||||
ActionIcon::ActionIcon(EngravingItem* score)
|
||||
: EngravingItem(ElementType::ACTION_ICON, score)
|
||||
{
|
||||
m_iconFont = Font(QString::fromStdString(engravingConfiguration()->iconsFontFamily()));
|
||||
}
|
||||
|
||||
ActionIcon* ActionIcon::clone() const
|
||||
|
@ -66,6 +70,7 @@ qreal ActionIcon::extent() const
|
|||
void ActionIcon::setExtent(qreal extent)
|
||||
{
|
||||
m_extent = extent;
|
||||
m_iconFont.setPointSizeF(m_extent / 2);
|
||||
}
|
||||
|
||||
void ActionIcon::write(XmlWriter& xml) const
|
||||
|
@ -102,9 +107,10 @@ void ActionIcon::layout()
|
|||
setbbox(boundingBox());
|
||||
}
|
||||
|
||||
void ActionIcon::draw(mu::draw::Painter* painter) const
|
||||
void ActionIcon::draw(Painter* painter) const
|
||||
{
|
||||
TRACE_OBJ_DRAW;
|
||||
painter->setFont(m_iconFont);
|
||||
painter->drawText(boundingBox(), Qt::AlignCenter, QChar(m_icon));
|
||||
}
|
||||
|
||||
|
|
|
@ -91,6 +91,7 @@ private:
|
|||
std::string m_actionCode;
|
||||
char16_t m_icon = 0;
|
||||
qreal m_extent { 40 };
|
||||
mu::draw::Font m_iconFont;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -337,6 +337,15 @@ public:
|
|||
BEAM_DISTANCE_REGULAR = 0xF425,
|
||||
BEAM_DISTANCE_WIDE = 0xF426,
|
||||
|
||||
ACCIACCATURA = 0xF427,
|
||||
APPOGGIATURA = 0xF428,
|
||||
GRACE4 = 0xF429,
|
||||
GRACE16 = 0xF42A,
|
||||
GRACE32 = 0xF42B,
|
||||
GRACE8_AFTER = 0xF42C,
|
||||
GRACE16_AFTER = 0xF42D,
|
||||
GRACE32_AFTER = 0xF42E,
|
||||
|
||||
NONE = 0xFFFF
|
||||
};
|
||||
|
||||
|
|
|
@ -513,35 +513,43 @@ const UiActionList NotationUiActions::m_actions = {
|
|||
),
|
||||
UiAction("acciaccatura",
|
||||
mu::context::UiCtxNotationOpened,
|
||||
QT_TRANSLATE_NOOP("action", "Acciaccatura")
|
||||
QT_TRANSLATE_NOOP("action", "Acciaccatura"),
|
||||
IconCode::Code::ACCIACCATURA
|
||||
),
|
||||
UiAction("appoggiatura",
|
||||
mu::context::UiCtxNotationOpened,
|
||||
QT_TRANSLATE_NOOP("action", "Appoggiatura")
|
||||
QT_TRANSLATE_NOOP("action", "Appoggiatura"),
|
||||
IconCode::Code::APPOGGIATURA
|
||||
),
|
||||
UiAction("grace4",
|
||||
mu::context::UiCtxNotationOpened,
|
||||
QT_TRANSLATE_NOOP("action", "Grace: quarter")
|
||||
QT_TRANSLATE_NOOP("action", "Grace: quarter"),
|
||||
IconCode::Code::GRACE4
|
||||
),
|
||||
UiAction("grace16",
|
||||
mu::context::UiCtxNotationOpened,
|
||||
QT_TRANSLATE_NOOP("action", "Grace: 16th")
|
||||
QT_TRANSLATE_NOOP("action", "Grace: 16th"),
|
||||
IconCode::Code::GRACE16
|
||||
),
|
||||
UiAction("grace32",
|
||||
mu::context::UiCtxNotationOpened,
|
||||
QT_TRANSLATE_NOOP("action", "Grace: 32nd")
|
||||
QT_TRANSLATE_NOOP("action", "Grace: 32nd"),
|
||||
IconCode::Code::GRACE32
|
||||
),
|
||||
UiAction("grace8after",
|
||||
mu::context::UiCtxNotationOpened,
|
||||
QT_TRANSLATE_NOOP("action", "Grace: 8th after")
|
||||
QT_TRANSLATE_NOOP("action", "Grace: 8th after"),
|
||||
IconCode::Code::GRACE8_AFTER
|
||||
),
|
||||
UiAction("grace16after",
|
||||
mu::context::UiCtxNotationOpened,
|
||||
QT_TRANSLATE_NOOP("action", "Grace: 16th after")
|
||||
QT_TRANSLATE_NOOP("action", "Grace: 16th after"),
|
||||
IconCode::Code::GRACE16_AFTER
|
||||
),
|
||||
UiAction("grace32after",
|
||||
mu::context::UiCtxNotationOpened,
|
||||
QT_TRANSLATE_NOOP("action", "Grace: 32nd after")
|
||||
QT_TRANSLATE_NOOP("action", "Grace: 32nd after"),
|
||||
IconCode::Code::GRACE32_AFTER
|
||||
),
|
||||
UiAction("beam-start",
|
||||
mu::context::UiCtxNotationOpened,
|
||||
|
|
Loading…
Reference in a new issue