more style values for lyrics
This commit is contained in:
parent
2b277a4590
commit
4944400c4d
4 changed files with 726 additions and 276 deletions
|
@ -501,9 +501,9 @@ void Lyrics::setNo(int n)
|
|||
// adjust beween LYRICS1 and LYRICS2 only; keep other styles as they are
|
||||
// (_no is 0-based, so odd _no means even line and viceversa)
|
||||
if (type() == ElementType::LYRICS) {
|
||||
if( (_no & 1) && subStyle() == SubStyle::LYRIC1)
|
||||
if ((_no & 1) && subStyle() == SubStyle::LYRIC1)
|
||||
initSubStyle(SubStyle::LYRIC2);
|
||||
if( !(_no & 1) && subStyle() == SubStyle::LYRIC2)
|
||||
if (!(_no & 1) && subStyle() == SubStyle::LYRIC2)
|
||||
initSubStyle(SubStyle::LYRIC1);
|
||||
}
|
||||
}
|
||||
|
@ -945,6 +945,18 @@ StyleIdx Lyrics::getPropertyStyle(P_ID id) const
|
|||
switch (id) {
|
||||
case P_ID::PLACEMENT:
|
||||
return StyleIdx::lyricsPlacement;
|
||||
case P_ID::FONT_FACE:
|
||||
return isEven() ? StyleIdx::lyricsEvenFontFace : StyleIdx::lyricsOddFontFace;
|
||||
case P_ID::FONT_SIZE:
|
||||
return isEven() ? StyleIdx::lyricsEvenFontSize : StyleIdx::lyricsOddFontSize;
|
||||
case P_ID::FONT_BOLD:
|
||||
return isEven() ? StyleIdx::lyricsEvenFontBold : StyleIdx::lyricsOddFontBold;
|
||||
case P_ID::FONT_ITALIC:
|
||||
return isEven() ? StyleIdx::lyricsEvenFontItalic : StyleIdx::lyricsOddFontItalic;
|
||||
case P_ID::FONT_UNDERLINE:
|
||||
return isEven() ? StyleIdx::lyricsEvenFontUnderline : StyleIdx::lyricsOddFontUnderline;
|
||||
case P_ID::ALIGN:
|
||||
return isEven() ? StyleIdx::lyricsEvenAlign : StyleIdx::lyricsOddAlign;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -960,6 +972,7 @@ void Lyrics::styleChanged()
|
|||
{
|
||||
if (placementStyle == PropertyFlags::STYLED)
|
||||
setPlacement(Placement(score()->styleI(StyleIdx::lyricsPlacement)));
|
||||
Text::styleChanged();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
|
|
|
@ -42,8 +42,6 @@ class LyricsLine;
|
|||
|
||||
class Lyrics : public Text {
|
||||
Q_GADGET
|
||||
Q_PROPERTY(Ms::Lyrics::Syllabic syllabic READ syllabic WRITE setSyllabic)
|
||||
Q_ENUMS(Syllabic)
|
||||
|
||||
public:
|
||||
enum class Syllabic : char { SINGLE, BEGIN, END, MIDDLE };
|
||||
|
@ -107,6 +105,7 @@ class Lyrics : public Text {
|
|||
virtual QString subtypeName() const override { return QObject::tr("Verse %1").arg(_no + 1); }
|
||||
void setNo(int n);
|
||||
int no() const { return _no; }
|
||||
bool isEven() const { return _no % 1; }
|
||||
void setSyllabic(Syllabic s) { _syllabic = s; }
|
||||
Syllabic syllabic() const { return _syllabic; }
|
||||
virtual void add(Element*) override;
|
||||
|
|
|
@ -90,6 +90,17 @@ EditStyle::EditStyle(Score* s, QWidget* parent)
|
|||
{ StyleIdx::lyricsAlignVerseNumber, false, lyricsAlignVerseNumber, resetLyricsAlignVerseNumber },
|
||||
{ StyleIdx::lyricsLineThickness, false, lyricsLineThickness, resetLyricsLineThickness },
|
||||
|
||||
{ StyleIdx::lyricsOddFontFace, false, lyricsOddFontFace, resetLyricsOddFontFace },
|
||||
{ StyleIdx::lyricsOddFontSize, false, lyricsOddFontSize, resetLyricsOddFontSize },
|
||||
{ StyleIdx::lyricsOddFontBold, false, lyricsOddFontBold, resetLyricsOddFontBold },
|
||||
{ StyleIdx::lyricsOddFontItalic, false, lyricsOddFontItalic, resetLyricsOddFontItalic },
|
||||
{ StyleIdx::lyricsOddFontUnderline, false, lyricsOddFontUnderline, resetLyricsOddFontUnderline },
|
||||
{ StyleIdx::lyricsEvenFontFace, false, lyricsEvenFontFace, resetLyricsEvenFontFace },
|
||||
{ StyleIdx::lyricsEvenFontSize, false, lyricsEvenFontSize, resetLyricsEvenFontSize },
|
||||
{ StyleIdx::lyricsEvenFontBold, false, lyricsEvenFontBold, resetLyricsEvenFontBold },
|
||||
{ StyleIdx::lyricsEvenFontItalic, false, lyricsEvenFontItalic, resetLyricsEvenFontItalic },
|
||||
{ StyleIdx::lyricsEvenFontUnderline, false, lyricsEvenFontUnderline, resetLyricsEvenFontUnderline },
|
||||
|
||||
{ StyleIdx::systemFrameDistance, false, systemFrameDistance, resetSystemFrameDistance },
|
||||
{ StyleIdx::frameSystemDistance, false, frameSystemDistance, resetFrameSystemDistance },
|
||||
{ StyleIdx::minMeasureWidth, false, minMeasureWidth_2, resetMinMeasureWidth },
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue