Skip to content

Commit 6341f70

Browse files
committed
fix: Display border radius fucked
1 parent f8227d0 commit 6341f70

File tree

6 files changed

+14
-9
lines changed

6 files changed

+14
-9
lines changed

JuceLibraryCode/JucePluginDefines.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155
#define JucePlugin_ARAFactoryID "com.Dimethoxy.Plasma.factory"
156156
#endif
157157
#ifndef JucePlugin_ARADocumentArchiveID
158-
#define JucePlugin_ARADocumentArchiveID "com.Dimethoxy.Plasma.aradocumentarchive.1.2.0"
158+
#define JucePlugin_ARADocumentArchiveID "com.Dimethoxy.Plasma.aradocumentarchive.1.2.1"
159159
#endif
160160
#ifndef JucePlugin_ARACompatibleArchiveIDs
161161
#define JucePlugin_ARACompatibleArchiveIDs ""

Source/BaseVisualiser.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,16 +147,18 @@ BaseVisualiser::timerCallback()
147147
}
148148

149149
void
150-
BaseVisualiser::setColours(Colour bk, Colour fg) noexcept
150+
BaseVisualiser::setColours(Colour bk, Colour wf, Colour fg) noexcept
151151
{
152152
backgroundColour = bk;
153-
waveformColour = fg;
153+
foregroundColour = fg;
154+
waveformColour = wf;
154155
repaint();
155156
}
156157

157158
void
158159
BaseVisualiser::paint(Graphics& g)
159160
{
161+
g.fillAll(foregroundColour);
160162
g.setColour(backgroundColour);
161163
g.fillRoundedRectangle(getLocalBounds().toFloat(), cornerRadius);
162164
auto r = getLocalBounds().toFloat();

Source/BaseVisualiser.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ class BaseVisualiser
5757
void pushSample(const float* samplesForEachChannel, int numChannels);
5858

5959
/** Sets the colours used to paint the */
60-
void setColours(Colour backgroundColour, Colour waveformColour) noexcept;
60+
void setColours(Colour backgroundColour,
61+
Colour waveformColour,
62+
Colour foregroundColour) noexcept;
6163

6264
/** Sets the frequency at which the component repaints itself. */
6365
void setRepaintRate(int frequencyInHz);
@@ -82,6 +84,7 @@ class BaseVisualiser
8284
int numLevels,
8385
int nextSample);
8486

87+
void setForegroundColor(Colour c);
8588
//==============================================================================
8689
/** @internal */
8790
void paint(Graphics&) override;
@@ -92,7 +95,7 @@ class BaseVisualiser
9295

9396
OwnedArray<ChannelInfo> channels;
9497
int numSamples, inputSamplesPerBlock;
95-
Colour backgroundColour, waveformColour;
98+
Colour backgroundColour, foregroundColour, waveformColour;
9699

97100
void timerCallback() override;
98101
int cornerRadius;

Source/PluginEditor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1674,7 +1674,7 @@ PlasmaAudioProcessorEditor::setBackgroundColor(Colour c)
16741674
for (auto* slider : getSliders()) {
16751675
slider->setColour(Slider::ColourIds::backgroundColourId, c);
16761676
}
1677-
waveformComponent->setBackgroundColor(c);
1677+
waveformComponent->setBackgroundColor(c, foregroundColor);
16781678
}
16791679

16801680
void

Source/WaveformComponent.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ WaveformComponent::setColor(Colour c)
3535
}
3636

3737
void
38-
WaveformComponent::setBackgroundColor(Colour c)
38+
WaveformComponent::setBackgroundColor(Colour c, Colour f)
3939
{
40-
setColours(c, c);
40+
setColours(c, f, f);
4141
}

Source/WaveformComponent.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class WaveformComponent : public BaseVisualiser
1919
int numLevels,
2020
int nextSample) override;
2121
void setColor(Colour c);
22-
void setBackgroundColor(Colour c);
22+
void setBackgroundColor(Colour c, Colour f);
2323

2424
private:
2525
Colour color = Colour(255, 255, 255);

0 commit comments

Comments
 (0)