Skip to content
Snippets Groups Projects
Commit c7f89986 authored by Josh Siegle's avatar Josh Siegle
Browse files

Fixed font loading

parent b8411b0f
Branches
Tags
No related merge requests found
......@@ -30,14 +30,11 @@
static const Colour COLOUR_PRIMARY (Colours::black.withAlpha (0.87f));
static const Colour COLOUR_ACCENT (Colour::fromRGB (3, 169, 244));
static const Font FONT_LABELS ("Default", 13.f, Font::plain);
CAREditor::CAREditor (GenericProcessor* parentProcessor, bool useDefaultParameterEditors)
: GenericEditor (parentProcessor, useDefaultParameterEditors)
, m_currentChannelsView (REFERENCE_CHANNELS)
, m_channelSelectorButtonManager (new LinearButtonGroupManager)
, m_gainSlider (new ParameterSlider (0.0, 100.0, 100.0, FONT_LABELS))
, m_gainSlider (new ParameterSlider (0.0, 100.0, 100.0, Font("Default", 13.f, Font::plain)))
{
TextButton* referenceChannelsButton = new TextButton ("Reference", "Switch to reference channels");
referenceChannelsButton->setClickingTogglesState (true);
......@@ -82,7 +79,7 @@ void CAREditor::paint (Graphics& g)
// Draw slider's label
// ========================================================================
g.setColour (Colours::darkgrey);
g.setFont (FONT_LABELS);
g.setFont(Font("Default", 13.f, Font::plain));
auto gainSliderBounds = m_gainSlider->getBounds();
g.drawText (m_gainSlider->getName().toUpperCase(),
......
......@@ -30,8 +30,6 @@
static const Colour COLOUR_SLIDER_TRACK (Colour::fromRGB (92, 92, 92));
static const Colour COLOUR_SLIDER_TRACK_FILL (Colour::fromRGB (255, 255, 255));
static const Font FONT_LABEL ("Small Text", 12, Font::plain);
MuteButton::MuteButton()
: ImageButton ("MuteButton")
......@@ -79,7 +77,7 @@ void AudioWindowButton::paintButton (Graphics& g, bool isMouseOver, bool isButto
const bool isLatencyLabelVisible = getParentComponent()->getWidth() >= 450;
auto textToDraw = isLatencyLabelVisible ? textString : textString.fromLastOccurrenceOf (":", false, true);
//g.setFont (FONT_LABEL);
g.setFont (Font("Small Text", 12, Font::plain));
g.drawSingleLineText (textToDraw, 0, 15);
}
......@@ -251,7 +249,7 @@ void AudioEditor::paint (Graphics& g)
{
const int margin = getWidth() * 0.03;
g.setColour (Colours::lightgrey);
//g.setFont (FONT_LABEL);
g.setFont (Font("Small Text", 12, Font::plain));
g.drawSingleLineText ("GATE:", volumeSlider->getBounds().getRight() + margin, 20);
}
......
......@@ -27,9 +27,6 @@
#include <stdio.h>
static const Font FONT_LABEL ("Small Text", 10, Font::plain);
FileReaderEditor::FileReaderEditor (GenericProcessor* parentNode, bool useDefaultParameterEditors = true)
: GenericEditor (parentNode, useDefaultParameterEditors)
, fileReader (static_cast<FileReader*> (parentNode))
......@@ -312,7 +309,7 @@ DualTimeComponent::DualTimeComponent (FileReaderEditor* e, bool editable)
l = new Label ("Time1");
l->setBounds (0, 0, 75, 20);
l->setEditable (isEditable);
l->setFont (FONT_LABEL);
l->setFont (Font("Small Text", 10, Font::plain));
if (isEditable)
{
l->addListener (this);
......@@ -326,7 +323,7 @@ DualTimeComponent::DualTimeComponent (FileReaderEditor* e, bool editable)
l = new Label ("Time2");
l->setBounds (85, 0, 75, 20);
l->setEditable (isEditable);
l->setFont (FONT_LABEL);
l->setFont (Font("Small Text", 10, Font::plain));
if (isEditable)
{
l->addListener (this);
......@@ -355,7 +352,7 @@ void DualTimeComponent::paint (Graphics& g)
else
sep = "/";
g.setFont (FONT_LABEL);
g.setFont (Font("Small Text", 10, Font::plain));
g.setColour (Colours::darkgrey);
g.drawText (sep, 78, 0, 5, 20, Justification::centred, false);
}
......
......@@ -23,11 +23,6 @@
#include "GraphViewer.h"
static const Font FONT_LABEL ("Paragraph", 50, Font::plain);
static const Font FONT_VERSION ("Small Text", 14, Font::plain);
GraphViewer::GraphViewer()
{
JUCEApplication* app = JUCEApplication::getInstance();
......@@ -248,14 +243,14 @@ void GraphViewer::paint (Graphics& g)
{
g.fillAll (Colours::darkgrey);
//g.setFont (FONT_LABEL);
g.setFont (Font("Paragraph", 50, Font::plain));
g.setColour (Colours::grey);
g.drawFittedText ("open ephys", 40, 40, getWidth()-50, getHeight()-60, Justification::bottomRight, 100);
//g.setFont (FONT_VERSION);
g.setFont (Font("Small Text", 14, Font::plain));
g.drawFittedText (currentVersionText, 40, 40, getWidth()-50, getHeight()-45, Justification::bottomRight, 100);
// Draw connections
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment