| @@ -163,7 +163,7 @@ public: | |||||
| return getAppSettings().swatchColours [index]; | return getAppSettings().swatchColours [index]; | ||||
| } | } | ||||
| void setSwatchColour (int index, const Colour& newColour) const override | |||||
| void setSwatchColour (int index, const Colour& newColour) override | |||||
| { | { | ||||
| getAppSettings().swatchColours.set (index, newColour); | getAppSettings().swatchColours.set (index, newColour); | ||||
| } | } | ||||
| @@ -208,7 +208,7 @@ Colour StoredSettings::ColourSelectorWithSwatches::getSwatchColour (int index) c | |||||
| return getAppSettings().swatchColours [index]; | return getAppSettings().swatchColours [index]; | ||||
| } | } | ||||
| void StoredSettings::ColourSelectorWithSwatches::setSwatchColour (int index, const Colour& newColour) const | |||||
| void StoredSettings::ColourSelectorWithSwatches::setSwatchColour (int index, const Colour& newColour) | |||||
| { | { | ||||
| getAppSettings().swatchColours.set (index, newColour); | getAppSettings().swatchColours.set (index, newColour); | ||||
| } | } | ||||
| @@ -57,7 +57,7 @@ public: | |||||
| int getNumSwatches() const override; | int getNumSwatches() const override; | ||||
| Colour getSwatchColour (int index) const override; | Colour getSwatchColour (int index) const override; | ||||
| void setSwatchColour (int index, const Colour& newColour) const override; | |||||
| void setSwatchColour (int index, const Colour& newColour) override; | |||||
| }; | }; | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -429,7 +429,7 @@ void ColourSelector::paint (Graphics& g) | |||||
| if ((flags & showColourAtTop) != 0) | if ((flags & showColourAtTop) != 0) | ||||
| { | { | ||||
| const Colour currentColour (getCurrentColour()); | |||||
| auto currentColour = getCurrentColour(); | |||||
| g.fillCheckerBoard (previewArea, 10, 10, | g.fillCheckerBoard (previewArea, 10, 10, | ||||
| Colour (0xffdddddd).overlaidWith (currentColour), | Colour (0xffdddddd).overlaidWith (currentColour), | ||||
| @@ -446,14 +446,11 @@ void ColourSelector::paint (Graphics& g) | |||||
| g.setColour (findColour (labelTextColourId)); | g.setColour (findColour (labelTextColourId)); | ||||
| g.setFont (11.0f); | g.setFont (11.0f); | ||||
| for (int i = 4; --i >= 0;) | |||||
| { | |||||
| if (sliders[i]->isVisible()) | |||||
| g.drawText (sliders[i]->getName() + ":", | |||||
| 0, sliders[i]->getY(), | |||||
| sliders[i]->getX() - 8, sliders[i]->getHeight(), | |||||
| for (auto* s : sliders) | |||||
| if (s->isVisible()) | |||||
| g.drawText (s->getName() + ":", | |||||
| 0, s->getY(), s->getX() - 8, s->getHeight(), | |||||
| Justification::centredRight, false); | Justification::centredRight, false); | ||||
| } | |||||
| } | } | ||||
| } | } | ||||
| @@ -515,7 +512,7 @@ void ColourSelector::resized() | |||||
| for (int i = 0; i < numSwatches; ++i) | for (int i = 0; i < numSwatches; ++i) | ||||
| { | { | ||||
| SwatchComponent* const sc = new SwatchComponent (*this, i); | |||||
| auto* sc = new SwatchComponent (*this, i); | |||||
| swatchComponents.add (sc); | swatchComponents.add (sc); | ||||
| addAndMakeVisible (sc); | addAndMakeVisible (sc); | ||||
| } | } | ||||
| @@ -566,7 +563,7 @@ Colour ColourSelector::getSwatchColour (const int) const | |||||
| return Colours::black; | return Colours::black; | ||||
| } | } | ||||
| void ColourSelector::setSwatchColour (const int, const Colour&) const | |||||
| void ColourSelector::setSwatchColour (int, const Colour&) | |||||
| { | { | ||||
| jassertfalse; // if you've overridden getNumSwatches(), you also need to implement this method | jassertfalse; // if you've overridden getNumSwatches(), you also need to implement this method | ||||
| } | } | ||||
| @@ -110,7 +110,7 @@ public: | |||||
| setSwatchColour(), to return the number of colours you want, and to set and retrieve | setSwatchColour(), to return the number of colours you want, and to set and retrieve | ||||
| their values. | their values. | ||||
| */ | */ | ||||
| virtual void setSwatchColour (int index, const Colour& newColour) const; | |||||
| virtual void setSwatchColour (int index, const Colour& newColour); | |||||
| //============================================================================== | //============================================================================== | ||||