Skip to content

Commit

Permalink
Add inverted noteBackgroundColor
Browse files Browse the repository at this point in the history
Rebase of #16830
  • Loading branch information
limse10 authored and Jojo-Schmitz committed Apr 19, 2024
1 parent ee85f0a commit 1c263a2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/engraving/internal/engravingconfiguration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ Color EngravingConfiguration::thumbnailBackgroundColor() const

Color EngravingConfiguration::noteBackgroundColor() const
{
return Color::WHITE;
return notationConfiguration()->foregroundColor();
}

Color EngravingConfiguration::fontPrimaryColor() const
Expand Down
2 changes: 2 additions & 0 deletions src/engraving/internal/engravingconfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "modularity/ioc.h"
#include "global/iglobalconfiguration.h"
#include "ui/iuiconfiguration.h"
#include "notation/inotationconfiguration.h"
#include "accessibility/iaccessibilityconfiguration.h"
#include "importexport/guitarpro/iguitarproconfiguration.h"

Expand All @@ -37,6 +38,7 @@ class EngravingConfiguration : public IEngravingConfiguration, public muse::asyn
{
INJECT(muse::IGlobalConfiguration, globalConfiguration)
INJECT(muse::ui::IUiConfiguration, uiConfiguration)
INJECT(mu::notation::INotationConfiguration, notationConfiguration)
INJECT(muse::accessibility::IAccessibilityConfiguration, accessibilityConfiguration)
INJECT(iex::guitarpro::IGuitarProConfiguration, guitarProConfiguration)

Expand Down
2 changes: 2 additions & 0 deletions src/engraving/rendering/dev/tdraw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2249,6 +2249,8 @@ void TDraw::draw(const Note* item, Painter* painter)
for (MuseScoreView* view : item->score()->getViewer()) {
view->drawBackground(painter, bb);
}
} else if (item->score()->printing()) {
painter->fillRect(bb, Color::WHITE);
} else {
painter->fillRect(bb, config->noteBackgroundColor());
}
Expand Down

0 comments on commit 1c263a2

Please sign in to comment.