Skip to content

Commit

Permalink
Set text line's text color
Browse files Browse the repository at this point in the history
  • Loading branch information
Jojo-Schmitz committed Sep 15, 2023
1 parent 1c4889f commit d8b0841
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/engraving/rendering/dev/tlayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5093,6 +5093,7 @@ void TLayout::layoutTextLineBaseSegment(TextLineBaseSegment* item, LayoutContext
}
item->text()->setPlacement(PlacementV::ABOVE);
item->text()->setTrack(item->track());
item->text()->setColor(tl->lineColor());
layout(item->text(), ctx);

if ((item->isSingleType() || item->isEndType())) {
Expand All @@ -5104,6 +5105,7 @@ void TLayout::layoutTextLineBaseSegment(TextLineBaseSegment* item, LayoutContext
item->endText()->setFontStyle(tl->endFontStyle());
item->endText()->setPlacement(PlacementV::ABOVE);
item->endText()->setTrack(item->track());
item->endText()->setColor(tl->lineColor());
layout(item->endText(), ctx);
} else {
item->endText()->setXmlText(u"");
Expand Down
2 changes: 2 additions & 0 deletions src/engraving/rendering/stable/tlayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4876,6 +4876,7 @@ void TLayout::layoutTextLineBaseSegment(TextLineBaseSegment* item, LayoutContext
}
item->text()->setPlacement(PlacementV::ABOVE);
item->text()->setTrack(item->track());
item->text()->setColor(tl->lineColor());
layout(item->text(), ctx);

if ((item->isSingleType() || item->isEndType())) {
Expand All @@ -4887,6 +4888,7 @@ void TLayout::layoutTextLineBaseSegment(TextLineBaseSegment* item, LayoutContext
item->endText()->setFontStyle(tl->endFontStyle());
item->endText()->setPlacement(PlacementV::ABOVE);
item->endText()->setTrack(item->track());
item->endText()->setColor(tl->lineColor());
layout(item->endText(), ctx);
} else {
item->endText()->setXmlText(u"");
Expand Down
Binary file added vtest/scores/line-colour.mscz
Binary file not shown.

0 comments on commit d8b0841

Please sign in to comment.