1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-08 04:20:09 +00:00

Added a new LookAndFeel (V4) and re-skinned the JUCE Demo and examples. Improved the JUCE Demo on mobile devices.

This commit is contained in:
hogliux 2017-04-27 12:21:41 +01:00
parent 3b422bef51
commit ef2c63e4e3
99 changed files with 5037 additions and 433 deletions

View file

@ -74,7 +74,7 @@ public:
void paint (Graphics& g) override
{
g.fillAll (Colours::white);
g.fillAll (getLookAndFeel().findColour (ResizableWindow::backgroundColourId));
}
void buttonClicked (Button* btn) override
@ -127,11 +127,14 @@ public:
if (ChannelClickListener* listener = dynamic_cast<ChannelClickListener*> (getAudioProcessor()))
{
const auto activeColour = getLookAndFeel().findColour (Slider::thumbColourId);
const auto inactiveColour = getLookAndFeel().findColour (Slider::trackColourId);
for (int i = 0; i < activeChannels.size(); ++i)
{
bool isActive = listener->isChannelActive (i);
activeChannels.getReference (i) = isActive;
channelButtons [i]->setColour (TextButton::buttonColourId, isActive ? Colours::lightsalmon : Colours::lightgrey);
channelButtons [i]->setColour (TextButton::buttonColourId, isActive ? activeColour : inactiveColour);
channelButtons [i]->repaint();
}
}
@ -159,13 +162,16 @@ private:
{
if (ChannelClickListener* listener = dynamic_cast<ChannelClickListener*> (getAudioProcessor()))
{
const auto activeColour = getLookAndFeel().findColour (Slider::thumbColourId);
const auto inactiveColour = getLookAndFeel().findColour (Slider::trackColourId);
for (int i = 0; i < activeChannels.size(); ++i)
{
bool isActive = listener->isChannelActive (i);
if (activeChannels.getReference (i) != isActive)
{
activeChannels.getReference (i) = isActive;
channelButtons [i]->setColour (TextButton::buttonColourId, isActive ? Colours::lightsalmon : Colours::lightgrey);
channelButtons [i]->setColour (TextButton::buttonColourId, isActive ? activeColour : inactiveColour);
channelButtons [i]->repaint();
}
}