Skip to content

Commit 01c4508

Browse files
committed
refactor: Update PluginProcessor to initialize properties with settings overrides and replacements
1 parent 189cfbd commit 01c4508

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

src/app/PluginEditor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ PluginEditor::PluginEditor(PluginProcessor& p)
77
, p(p)
88
, sizeFactor(p.scaleFactor)
99
, mainLayout({ 1.0 }, { 1.0 })
10-
, compositor("Oscilloscope", mainLayout, p.apvts, p.properties, sizeFactor)
10+
, compositor("OscilloScoPe", mainLayout, p.apvts, p.properties, sizeFactor)
1111
, compositorAttached(true)
1212
{
1313
if (OS_IS_WINDOWS) {

src/app/PluginProcessor.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,18 @@ PluginProcessor::PluginProcessor()
1818
#if PERFETTO
1919
MelatoninPerfetto::get().beginSession();
2020
#endif
21-
properties.initialize();
21+
22+
// We create an override for the background of the headers title
23+
dmt::configuration::SettingsOverrides settingsOverrides;
24+
settingsOverrides.push_back({ "Header.TitleButtonWidth", 170.0f });
25+
26+
// We create a replacement for the primary color
27+
dmt::configuration::SettingsReplacements settingsReplacements;
28+
settingsReplacements.push_back({ juce::Colour::fromString("#50FA7B"),
29+
juce::Colour::fromString("#8be9fd") });
30+
31+
// Initialize properties with overrides and replacements
32+
properties.initialize(settingsOverrides, settingsReplacements);
2233
}
2334

2435
PluginProcessor::~PluginProcessor()

0 commit comments

Comments
 (0)