Skip to content

Commit

Permalink
Use theme colours in canvas
Browse files Browse the repository at this point in the history
  • Loading branch information
anjaldoshi committed Mar 3, 2025
1 parent 2a1396f commit 6faedc3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions Source/PCAProjectionAxes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,17 @@ PCAProjectionAxes::PCAProjectionAxes (Electrode* electrode_) : GenericDrawAxes (
isOverUnit = -1;

rangeUpButton = new UtilityButton ("+");
rangeUpButton->setFont(FontOptions ("Fira Code", "Regular", 15.0f));
rangeUpButton->setRadius (3.0f);
rangeUpButton->addListener (this);
rangeUpButton->setBounds (35, 10, 20, 15);
rangeUpButton->setBounds (35, 10, 20, 20);
addAndMakeVisible (rangeUpButton);

rangeDownButton = new UtilityButton ("-");
rangeDownButton->setFont(FontOptions ("Fira Code", "Regular", 15.0f));
rangeDownButton->setRadius (3.0f);
rangeDownButton->addListener (this);
rangeDownButton->setBounds (10, 10, 20, 15);
rangeDownButton->setBounds (10, 10, 20, 20);
addAndMakeVisible (rangeDownButton);

redrawSpikes = true;
Expand Down
6 changes: 3 additions & 3 deletions Source/SpikePlot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,11 @@ void SpikePlot::setName (const String& name_)

void SpikePlot::paint (Graphics& g)
{
g.setColour (Colours::whitesmoke);
g.setFont (20);
g.setColour (findColour (ThemeColours::controlPanelText));
g.setFont (FontOptions ("Inter", "Regular", 20.0f));
g.drawText (name, 10, 0, 200, 20, Justification::left, false);

g.setColour (Colours::grey);
g.setColour (findColour (ThemeColours::componentBackground));
g.fillRoundedRectangle (0, 30, getWidth(), getHeight() - 30, 12.0f);
g.setColour (Colours::black);
g.fillRoundedRectangle (10, 40, getWidth() - 20, getHeight() - 50, 8.0f);
Expand Down
2 changes: 1 addition & 1 deletion Source/SpikeSorterCanvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ void SpikeSorterCanvas::resized()

void SpikeSorterCanvas::paint (Graphics& g)
{
g.fillAll (Colours::darkgrey);
g.fillAll (findColour (ThemeColours::componentParentBackground));
}

void SpikeSorterCanvas::refresh()
Expand Down

0 comments on commit 6faedc3

Please sign in to comment.