Skip to content
Snippets Groups Projects
Commit 0f94b1fc authored by Septen's avatar Septen
Browse files

Sliders colour behaviour improvements.

* ParameterSlider: added possibility to change rotary fill colour.
* CAR gain slider: changed rotary fill colour.
parent f9be0a39
Branches
Tags
No related merge requests found
......@@ -30,14 +30,14 @@
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", 14.f, Font::plain);
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 ButtonGroupManager)
, m_gainSlider (new ParameterSlider (0.0, 100.0, 100.0, Font ("Default", 14.f, Font::plain)))
, m_gainSlider (new ParameterSlider (0.0, 100.0, 100.0, FONT_LABELS))
{
TextButton* referenceChannelsButton = new TextButton ("Reference", "Switch to reference channels");
referenceChannelsButton->setToggleState (true, dontSendNotification);
......@@ -62,6 +62,7 @@ CAREditor::CAREditor (GenericProcessor* parentProcessor, bool useDefaultParamete
m_channelSelectorButtonManager->setAccentColour (COLOUR_ACCENT);
addAndMakeVisible (m_channelSelectorButtonManager);
m_gainSlider->setColour (Slider::rotarySliderFillColourId, Colour::fromRGB (255, 193, 7));
m_gainSlider->setName ("Gain (%)");
m_gainSlider->addListener (this);
addAndMakeVisible (m_gainSlider);
......
......@@ -447,12 +447,12 @@ void ParameterCheckbox::paintButton(Graphics& g, bool isMouseOver, bool isButton
ParameterSlider::ParameterSlider(float min, float max, float def, Font labelFont) :
Slider("name"), isEnabled(true), font(labelFont)
{
setSliderStyle(Slider::Rotary);
setRange(min,max,1.0f);
setValue(def);
setTextBoxStyle(Slider::NoTextBox, false, 40, 20);
setColour (Slider::rotarySliderFillColourId, Colour (240, 179, 12));
}
ParameterSlider::~ParameterSlider() {}
......@@ -477,7 +477,7 @@ void ParameterSlider::paint(Graphics& g)
p = makeRotaryPath(getMinimum(), getMaximum(), getValue());
if (isEnabled)
g.setColour(Colour(240,179,12));
g.setColour (findColour (Slider::rotarySliderFillColourId));
else
g.setColour(Colour(75,75,75));
......@@ -523,7 +523,6 @@ void ParameterEditor::channelSelectionUI()
int numChannels=channelSelector->getNumChannels();
if (parameter->isBoolean())
{
}
else if (parameter->isContinuous())
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment