@@ -36,6 +36,7 @@ SpectrumCanvas::SpectrumCanvas(SpectrumViewer* n)
36
36
viewport = std::make_unique<Viewport>();
37
37
viewport->setViewedComponent (canvasPlot.get (), true );
38
38
viewport->setScrollBarsShown (true , true );
39
+ viewport->setScrollBarThickness (12 );
39
40
addAndMakeVisible (viewport.get ());
40
41
}
41
42
@@ -205,6 +206,16 @@ void CanvasPlot::resized()
205
206
clearButton->setBounds (plt.getRight () - 80 , plt.getBottom () - 90 , 60 , 20 );
206
207
}
207
208
209
+ void CanvasPlot::lookAndFeelChanged ()
210
+ {
211
+ plt.setBackgroundColour (findColour (ThemeColours::componentParentBackground));
212
+ plt.setGridColour (findColour (ThemeColours::defaultText));
213
+ plt.setAxisColour (findColour (ThemeColours::defaultText));
214
+
215
+ chanColors[0 ] = findColour (ThemeColours::controlPanelText).withAlpha (0 .6f );
216
+ plt.plot (xvalues, currPower[0 ], chanColors[0 ], 1 .0f );
217
+ }
218
+
208
219
void CanvasPlot::updateActiveChans ()
209
220
{
210
221
activeChannels = processor->getActiveChans ();
@@ -398,7 +409,7 @@ void CanvasPlot::drawSpectrogram(std::vector<float> chanData)
398
409
399
410
void CanvasPlot::paint (Graphics& g)
400
411
{
401
- g.fillAll (Colour ( 28 , 28 , 28 ));
412
+ g.fillAll (findColour (ThemeColours::componentBackground ));
402
413
403
414
if (displayType == POWER_SPECTRUM)
404
415
{
@@ -408,7 +419,7 @@ void CanvasPlot::paint(Graphics& g)
408
419
int left = getWidth () - legendWidth - 10 ;
409
420
int top = 60 ;
410
421
411
- g.setFont (Font ( " Fira Code " , " SemiBold " , 16 .0f ));
422
+ g.setFont (FontOptions ( " Inter " , " Semi Bold " , 16 .0f ));
412
423
413
424
for (int i = 0 ; i < activeChannels.size (); i++)
414
425
{
@@ -420,7 +431,7 @@ void CanvasPlot::paint(Graphics& g)
420
431
, 30
421
432
, 30 );
422
433
423
- g.setColour (Colours::lightgrey );
434
+ g.setColour (findColour (ThemeColours::controlPanelText) );
424
435
String chan = processor->getChanName (activeChannels[i]);
425
436
g.drawFittedText (chan
426
437
, left + 45
@@ -430,14 +441,14 @@ void CanvasPlot::paint(Graphics& g)
430
441
, Justification::centredLeft
431
442
, 1 );
432
443
433
- g.setColour (Colours::grey );
444
+ g.setColour (findColour (ThemeColours::defaultFill) );
434
445
g.drawRect (left, top + 10 , 30 , 30 , 2 );
435
446
436
447
}
437
448
}
438
449
else
439
450
{
440
- g.setColour (Colours::white );
451
+ g.setColour (findColour (ThemeColours::controlPanelText) );
441
452
442
453
int w = 50 ;
443
454
int h = getHeight ();
@@ -449,6 +460,7 @@ void CanvasPlot::paint(Graphics& g)
449
460
int ticklabelWidth = 60 ;
450
461
int tickLabelHeight = 20 ;
451
462
463
+ g.setFont (FontOptions (" Inter" , " Regular" , 14 .0f ));
452
464
453
465
for (int k = 0 ; k <= 10 ; k++)
454
466
{
0 commit comments