| @@ -9,9 +9,9 @@ | |||||
| //============================================================================== | //============================================================================== | ||||
| class AUv3SynthEditor : public AudioProcessorEditor, | class AUv3SynthEditor : public AudioProcessorEditor, | ||||
| public ButtonListener, | |||||
| public Slider::Listener, | |||||
| private Timer | |||||
| public ButtonListener, | |||||
| public Slider::Listener, | |||||
| private Timer | |||||
| { | { | ||||
| public: | public: | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -9,7 +9,7 @@ | |||||
| #include "../JuceLibraryCode/JuceHeader.h" | #include "../JuceLibraryCode/JuceHeader.h" | ||||
| //============================================================================== | //============================================================================== | ||||
| class MaterialLookAndFeel : public LookAndFeel_V3 | |||||
| class MaterialLookAndFeel : public LookAndFeel_V4 | |||||
| { | { | ||||
| public: | public: | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -24,16 +24,10 @@ public: | |||||
| void drawButtonBackground (Graphics& g, | void drawButtonBackground (Graphics& g, | ||||
| Button& button, | Button& button, | ||||
| const Colour& /*backgroundColour*/, | const Colour& /*backgroundColour*/, | ||||
| bool isMouseOverButton, | |||||
| bool /*isMouseOverButton*/, | |||||
| bool isButtonDown) override | bool isButtonDown) override | ||||
| { | { | ||||
| ignoreUnused (isMouseOverButton); | |||||
| const int width = button.getWidth(); | |||||
| const int height = button.getHeight(); | |||||
| Rectangle<float> buttonRect (0, 0, width, height); | |||||
| buttonRect.reduce (haloRadius, 0.0f); | |||||
| const auto buttonRect = button.getLocalBounds().toFloat(); | |||||
| if (isButtonDown) | if (isButtonDown) | ||||
| g.setColour (brightButtonColour.withAlpha (0.7f)); | g.setColour (brightButtonColour.withAlpha (0.7f)); | ||||
| @@ -58,7 +52,7 @@ public: | |||||
| else | else | ||||
| g.setColour (backgroundColour); | g.setColour (backgroundColour); | ||||
| g.drawFittedText (button.getButtonText(), 0, 1, | |||||
| g.drawFittedText (button.getButtonText(), 0, 0, | |||||
| button.getWidth(), | button.getWidth(), | ||||
| button.getHeight(), | button.getHeight(), | ||||
| Justification::centred, 2); | Justification::centred, 2); | ||||
| @@ -62,7 +62,8 @@ public: | |||||
| { | { | ||||
| public: | public: | ||||
| MainWindow (String name) : DocumentWindow (name, | MainWindow (String name) : DocumentWindow (name, | ||||
| Colours::lightgrey, | |||||
| LookAndFeel::getDefaultLookAndFeel() | |||||
| .findColour (ResizableWindow::backgroundColourId), | |||||
| DocumentWindow::allButtons) | DocumentWindow::allButtons) | ||||
| { | { | ||||
| setUsingNativeTitleBar (true); | setUsingNativeTitleBar (true); | ||||
| @@ -32,9 +32,9 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| // (Our component is opaque, so we must completely fill the background with a solid colour) | // (Our component is opaque, so we must completely fill the background with a solid colour) | ||||
| g.fillAll (Colours::black); | |||||
| g.fillAll (getLookAndFeel().findColour (ResizableWindow::backgroundColourId)); | |||||
| g.setColour (Colours::white); | |||||
| g.setColour (getLookAndFeel().findColour (Slider::thumbColourId)); | |||||
| const int fishLength = 15; | const int fishLength = 15; | ||||
| Path spinePath; | Path spinePath; | ||||
| @@ -62,7 +62,8 @@ public: | |||||
| { | { | ||||
| public: | public: | ||||
| MainWindow (String name) : DocumentWindow (name, | MainWindow (String name) : DocumentWindow (name, | ||||
| Colours::lightgrey, | |||||
| LookAndFeel::getDefaultLookAndFeel() | |||||
| .findColour (ResizableWindow::backgroundColourId), | |||||
| DocumentWindow::allButtons) | DocumentWindow::allButtons) | ||||
| { | { | ||||
| setUsingNativeTitleBar (true); | setUsingNativeTitleBar (true); | ||||
| @@ -76,7 +76,7 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| // (Our component is opaque, so we must completely fill the background with a solid colour) | // (Our component is opaque, so we must completely fill the background with a solid colour) | ||||
| g.fillAll (Colours::black); | |||||
| g.fillAll (getLookAndFeel().findColour (ResizableWindow::backgroundColourId)); | |||||
| const float centreY = getHeight() / 2.0f; | const float centreY = getHeight() / 2.0f; | ||||
| const float radius = amplitude * 200.0f; | const float radius = amplitude * 200.0f; | ||||
| @@ -95,7 +95,7 @@ public: | |||||
| wavePath.lineTo (x, centreY + amplitude * getHeight() * 2.0f | wavePath.lineTo (x, centreY + amplitude * getHeight() * 2.0f | ||||
| * std::sin (x * frequency * 0.0001f)); | * std::sin (x * frequency * 0.0001f)); | ||||
| g.setColour (Colours::grey); | |||||
| g.setColour (getLookAndFeel().findColour (Slider::thumbColourId)); | |||||
| g.strokePath (wavePath, PathStrokeType (2.0f)); | g.strokePath (wavePath, PathStrokeType (2.0f)); | ||||
| } | } | ||||
| @@ -21,7 +21,7 @@ public: | |||||
| { | { | ||||
| public: | public: | ||||
| MainWindow (String name) : DocumentWindow (name, | MainWindow (String name) : DocumentWindow (name, | ||||
| Colours::lightgrey, | |||||
| getLookAndFeel().findColour (ResizableWindow::backgroundColourId), | |||||
| DocumentWindow::allButtons) | DocumentWindow::allButtons) | ||||
| { | { | ||||
| setUsingNativeTitleBar (true); | setUsingNativeTitleBar (true); | ||||
| @@ -148,7 +148,6 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| g.fillAll (Colours::lightgrey); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| @@ -21,7 +21,7 @@ public: | |||||
| { | { | ||||
| public: | public: | ||||
| MainWindow (String name) : DocumentWindow (name, | MainWindow (String name) : DocumentWindow (name, | ||||
| Colours::lightgrey, | |||||
| getLookAndFeel().findColour (ResizableWindow::backgroundColourId), | |||||
| DocumentWindow::allButtons) | DocumentWindow::allButtons) | ||||
| { | { | ||||
| setUsingNativeTitleBar (true); | setUsingNativeTitleBar (true); | ||||
| @@ -46,7 +46,6 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| g.fillAll (Colours::lightgrey); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| @@ -20,7 +20,7 @@ public: | |||||
| struct MainWindow : public DocumentWindow | struct MainWindow : public DocumentWindow | ||||
| { | { | ||||
| MainWindow (String name) : DocumentWindow (name, | MainWindow (String name) : DocumentWindow (name, | ||||
| Colours::lightgrey, | |||||
| LookAndFeel::getDefaultLookAndFeel().findColour (ResizableWindow::backgroundColourId), | |||||
| DocumentWindow::allButtons) | DocumentWindow::allButtons) | ||||
| { | { | ||||
| setUsingNativeTitleBar (true); | setUsingNativeTitleBar (true); | ||||
| @@ -100,7 +100,7 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| g.fillAll (Colours::lightgrey); | |||||
| g.setColour (getLookAndFeel().findColour (Label::textColourId)); | |||||
| g.drawText ("Connect a Lightpad Block to play.", | g.drawText ("Connect a Lightpad Block to play.", | ||||
| getLocalBounds(), Justification::centred, false); | getLocalBounds(), Justification::centred, false); | ||||
| } | } | ||||
| @@ -58,7 +58,10 @@ public: | |||||
| { | { | ||||
| public: | public: | ||||
| MainWindow (const String& name) | MainWindow (const String& name) | ||||
| : DocumentWindow (name, Colours::lightgrey, DocumentWindow::allButtons) | |||||
| : DocumentWindow (name, | |||||
| LookAndFeel::getDefaultLookAndFeel() | |||||
| .findColour (ResizableWindow::backgroundColourId), | |||||
| DocumentWindow::allButtons) | |||||
| { | { | ||||
| setUsingNativeTitleBar (true); | setUsingNativeTitleBar (true); | ||||
| setContentOwned (createMainContentComponent(), true); | setContentOwned (createMainContentComponent(), true); | ||||
| @@ -84,7 +84,7 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| // (Our component is opaque, so we must completely fill the background with a solid colour) | // (Our component is opaque, so we must completely fill the background with a solid colour) | ||||
| g.fillAll (Colours::black); | |||||
| g.fillAll (getLookAndFeel().findColour (ResizableWindow::backgroundColourId)); | |||||
| Point<float> nextPos = pos + delta; | Point<float> nextPos = pos + delta; | ||||
| @@ -111,7 +111,7 @@ public: | |||||
| } | } | ||||
| // draw a circle | // draw a circle | ||||
| g.setColour (Colours::grey); | |||||
| g.setColour (getLookAndFeel().findColour (Slider::thumbColourId)); | |||||
| g.fillEllipse (pos.x, pos.y, 20, 20); | g.fillEllipse (pos.x, pos.y, 20, 20); | ||||
| drawWaveform (g, 20.0f, 0); | drawWaveform (g, 20.0f, 0); | ||||
| @@ -62,7 +62,7 @@ public: | |||||
| { | { | ||||
| public: | public: | ||||
| MainWindow (String name) : DocumentWindow (name, | MainWindow (String name) : DocumentWindow (name, | ||||
| Colours::lightgrey, | |||||
| LookAndFeel::getDefaultLookAndFeel().findColour (ResizableWindow::backgroundColourId), | |||||
| DocumentWindow::allButtons) | DocumentWindow::allButtons) | ||||
| { | { | ||||
| setUsingNativeTitleBar (true); | setUsingNativeTitleBar (true); | ||||
| @@ -25,7 +25,6 @@ MainContentComponent::~MainContentComponent() | |||||
| void MainContentComponent::paint (Graphics& g) | void MainContentComponent::paint (Graphics& g) | ||||
| { | { | ||||
| g.fillAll (Colour (0xff001F36)); | |||||
| } | } | ||||
| void MainContentComponent::resized() | void MainContentComponent::resized() | ||||
| @@ -24,12 +24,10 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| g.fillAll (Colours::black); | |||||
| // Only shows the red ellipse when the button is on. | // Only shows the red ellipse when the button is on. | ||||
| if (isOn) | if (isOn) | ||||
| { | { | ||||
| g.setColour (Colours::red); | |||||
| g.setColour (getLookAndFeel().findColour (Slider::thumbColourId)); | |||||
| g.fillEllipse (getLocalBounds().toFloat()); | g.fillEllipse (getLocalBounds().toFloat()); | ||||
| } | } | ||||
| } | } | ||||
| @@ -39,10 +39,12 @@ inline Colour getRandomColour (float brightness) | |||||
| inline Colour getRandomBrightColour() { return getRandomColour (0.8f); } | inline Colour getRandomBrightColour() { return getRandomColour (0.8f); } | ||||
| inline Colour getRandomDarkColour() { return getRandomColour (0.3f); } | inline Colour getRandomDarkColour() { return getRandomColour (0.3f); } | ||||
| inline void fillStandardDemoBackground (Graphics& g) | |||||
| inline Colour getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour uiColour, Colour fallback = Colour (0xff4d4d4d)) | |||||
| { | { | ||||
| g.setColour (Colour (0xff4d4d4d)); | |||||
| g.fillAll(); | |||||
| if (auto* v4 = dynamic_cast<LookAndFeel_V4*> (&LookAndFeel::getDefaultLookAndFeel())) | |||||
| return v4->getCurrentColourScheme().getUIColour (uiColour); | |||||
| return fallback; | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -44,7 +44,7 @@ public: | |||||
| s.setJustification (Justification::centred); | s.setJustification (Justification::centred); | ||||
| s.setWordWrap (AttributedString::none); | s.setWordWrap (AttributedString::none); | ||||
| s.append ("Drag Me!"); | s.append ("Drag Me!"); | ||||
| s.setColour (Colours::white); | |||||
| s.setColour (findColour (TextButton::textColourOffId)); | |||||
| s.draw (g, area); | s.draw (g, area); | ||||
| } | } | ||||
| @@ -168,7 +168,7 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| fillStandardDemoBackground (g); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground)); | |||||
| } | } | ||||
| private: | private: | ||||
| @@ -305,9 +305,13 @@ public: | |||||
| resultsBox.setScrollbarsShown (true); | resultsBox.setScrollbarsShown (true); | ||||
| resultsBox.setCaretVisible (false); | resultsBox.setCaretVisible (false); | ||||
| resultsBox.setPopupMenuEnabled (true); | resultsBox.setPopupMenuEnabled (true); | ||||
| resultsBox.setColour (TextEditor::backgroundColourId, Colour (0x32ffffff)); | |||||
| resultsBox.setColour (TextEditor::backgroundColourId, | |||||
| getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::widgetBackground, | |||||
| Colour (0x32ffffff))); | |||||
| resultsBox.setColour (TextEditor::outlineColourId, Colour (0x1c000000)); | resultsBox.setColour (TextEditor::outlineColourId, Colour (0x1c000000)); | ||||
| resultsBox.setColour (TextEditor::shadowColourId, Colour (0x16000000)); | resultsBox.setColour (TextEditor::shadowColourId, Colour (0x16000000)); | ||||
| resultsBox.setText ("Running this test measures the round-trip latency between the audio output and input " | resultsBox.setText ("Running this test measures the round-trip latency between the audio output and input " | ||||
| "devices you\'ve got selected.\n\n" | "devices you\'ve got selected.\n\n" | ||||
| "It\'ll play a sound, then try to measure the time at which the sound arrives " | "It\'ll play a sound, then try to measure the time at which the sound arrives " | ||||
| @@ -339,7 +343,7 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| fillStandardDemoBackground (g); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground)); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| @@ -273,6 +273,7 @@ public: | |||||
| startStopButton.setButtonText ("Play/Stop"); | startStopButton.setButtonText ("Play/Stop"); | ||||
| startStopButton.addListener (this); | startStopButton.addListener (this); | ||||
| startStopButton.setColour (TextButton::buttonColourId, Colour (0xff79ed7f)); | startStopButton.setColour (TextButton::buttonColourId, Colour (0xff79ed7f)); | ||||
| startStopButton.setColour (TextButton::textColourOffId, Colours::black); | |||||
| addAndMakeVisible (fileTreeComp); | addAndMakeVisible (fileTreeComp); | ||||
| @@ -305,7 +306,7 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| fillStandardDemoBackground (g); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground)); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| @@ -247,7 +247,7 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| fillStandardDemoBackground (g); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground)); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| @@ -44,10 +44,6 @@ public: | |||||
| diagnosticsBox.setScrollbarsShown (true); | diagnosticsBox.setScrollbarsShown (true); | ||||
| diagnosticsBox.setCaretVisible (false); | diagnosticsBox.setCaretVisible (false); | ||||
| diagnosticsBox.setPopupMenuEnabled (true); | diagnosticsBox.setPopupMenuEnabled (true); | ||||
| diagnosticsBox.setColour (TextEditor::textColourId, Colours::white); | |||||
| diagnosticsBox.setColour (TextEditor::backgroundColourId, Colour (0x32ffffff)); | |||||
| diagnosticsBox.setColour (TextEditor::outlineColourId, Colour (0x1c000000)); | |||||
| diagnosticsBox.setColour (TextEditor::shadowColourId, Colour (0x16000000)); | |||||
| MainAppWindow::getSharedAudioDeviceManager().addChangeListener (this); | MainAppWindow::getSharedAudioDeviceManager().addChangeListener (this); | ||||
| @@ -62,7 +58,7 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| fillStandardDemoBackground (g); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground)); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| @@ -277,7 +277,7 @@ public: | |||||
| //============================================================================== | //============================================================================== | ||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| fillStandardDemoBackground (g); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground)); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| @@ -30,49 +30,26 @@ inline float32 RandomFloat (float32 lo, float32 hi) { return Random::getSystemRa | |||||
| struct Settings | struct Settings | ||||
| { | { | ||||
| Settings() | |||||
| : viewCenter (0.0f, 20.0f), | |||||
| hz (60.0f), | |||||
| velocityIterations (8), | |||||
| positionIterations (3), | |||||
| drawShapes (1), | |||||
| drawJoints (1), | |||||
| drawAABBs (0), | |||||
| drawPairs (0), | |||||
| drawContactPoints (0), | |||||
| drawContactNormals (0), | |||||
| drawContactForces (0), | |||||
| drawFrictionForces (0), | |||||
| drawCOMs (0), | |||||
| drawStats (0), | |||||
| drawProfile (0), | |||||
| enableWarmStarting (1), | |||||
| enableContinuous (1), | |||||
| enableSubStepping (0), | |||||
| pause (0), | |||||
| singleStep (0) | |||||
| {} | |||||
| b2Vec2 viewCenter; | |||||
| float32 hz; | |||||
| int velocityIterations; | |||||
| int positionIterations; | |||||
| int drawShapes; | |||||
| int drawJoints; | |||||
| int drawAABBs; | |||||
| int drawPairs; | |||||
| int drawContactPoints; | |||||
| int drawContactNormals; | |||||
| int drawContactForces; | |||||
| int drawFrictionForces; | |||||
| int drawCOMs; | |||||
| int drawStats; | |||||
| int drawProfile; | |||||
| int enableWarmStarting; | |||||
| int enableContinuous; | |||||
| int enableSubStepping; | |||||
| int pause; | |||||
| int singleStep; | |||||
| b2Vec2 viewCenter { 0.0f, 20.0f }; | |||||
| float32 hz = 60.0f; | |||||
| int velocityIterations = 8; | |||||
| int positionIterations = 3; | |||||
| int drawShapes = 1; | |||||
| int drawJoints = 1; | |||||
| int drawAABBs = 0; | |||||
| int drawPairs = 0; | |||||
| int drawContactPoints = 0; | |||||
| int drawContactNormals = 0; | |||||
| int drawContactForces = 0; | |||||
| int drawFrictionForces = 0; | |||||
| int drawCOMs = 0; | |||||
| int drawStats = 0; | |||||
| int drawProfile = 0; | |||||
| int enableWarmStarting = 1; | |||||
| int enableContinuous = 1; | |||||
| int enableSubStepping = 0; | |||||
| int pause = 0; | |||||
| int singleStep = 0; | |||||
| }; | }; | ||||
| struct Test | struct Test | ||||
| @@ -107,11 +84,14 @@ public: | |||||
| void paintListBoxItem (int row, Graphics& g, int w, int h, bool rowIsSelected) override | void paintListBoxItem (int row, Graphics& g, int w, int h, bool rowIsSelected) override | ||||
| { | { | ||||
| auto& lf = LookAndFeel::getDefaultLookAndFeel(); | |||||
| if (rowIsSelected) | if (rowIsSelected) | ||||
| g.fillAll (LookAndFeel::getDefaultLookAndFeel().findColour (TextEditor::highlightColourId)); | |||||
| g.fillAll (Colour::contrasting (lf.findColour (ListBox::textColourId), | |||||
| lf.findColour (ListBox::backgroundColourId))); | |||||
| const Font f (h * 0.7f); | const Font f (h * 0.7f); | ||||
| g.setColour (Colours::black); | |||||
| g.setColour (lf.findColour (ListBox::textColourId)); | |||||
| g.setFont (f); | g.setFont (f); | ||||
| g.drawText (tests[row], Rectangle<int> (0, 0, w, h).reduced (2), | g.drawText (tests[row], Rectangle<int> (0, 0, w, h).reduced (2), | ||||
| Justification::centredLeft, true); | Justification::centredLeft, true); | ||||
| @@ -182,12 +162,10 @@ public: | |||||
| addAndMakeVisible (testsListBox); | addAndMakeVisible (testsListBox); | ||||
| testsListBox.setModel (&testsListModel); | testsListBox.setModel (&testsListModel); | ||||
| testsListBox.selectRow (dominoes); | testsListBox.selectRow (dominoes); | ||||
| testsListBox.setColour (ListBox::backgroundColourId, Colours::lightgrey); | |||||
| addAndMakeVisible (instructions); | addAndMakeVisible (instructions); | ||||
| instructions.setMultiLine (true); | instructions.setMultiLine (true); | ||||
| instructions.setReadOnly (true); | instructions.setReadOnly (true); | ||||
| instructions.setColour (TextEditor::backgroundColourId, Colours::lightgrey); | |||||
| startTimerHz (60); | startTimerHz (60); | ||||
| } | } | ||||
| @@ -199,14 +177,14 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| fillStandardDemoBackground (g); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground)); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| { | { | ||||
| Rectangle<int> r (getLocalBounds().reduced (4)); | |||||
| auto r = getLocalBounds().reduced (4); | |||||
| Rectangle<int> area (r.removeFromBottom (150)); | |||||
| auto area = r.removeFromBottom (150); | |||||
| testsListBox.setBounds (area.removeFromLeft (150)); | testsListBox.setBounds (area.removeFromLeft (150)); | ||||
| area.removeFromLeft (4); | area.removeFromLeft (4); | ||||
| instructions.setBounds (area); | instructions.setBounds (area); | ||||
| @@ -87,7 +87,7 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| fillStandardDemoBackground (g); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground)); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| @@ -61,7 +61,8 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| g.fillAll (Colours::lightgrey); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground, | |||||
| Colours::lightgrey)); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| @@ -48,7 +48,7 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| fillStandardDemoBackground (g); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground)); | |||||
| g.setColour (Colours::white); | g.setColour (Colours::white); | ||||
| g.setFont (15.0f); | g.setFont (15.0f); | ||||
| @@ -33,8 +33,16 @@ public: | |||||
| { | { | ||||
| addAndMakeVisible (rsaGroup); | addAndMakeVisible (rsaGroup); | ||||
| rsaGroup.setText ("RSA Encryption"); | rsaGroup.setText ("RSA Encryption"); | ||||
| rsaGroup.setColour (GroupComponent::outlineColourId, Colours::grey); | |||||
| rsaGroup.setColour (GroupComponent::textColourId, Colours::white); | |||||
| rsaGroup.setColour (GroupComponent::outlineColourId, | |||||
| getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::outline, | |||||
| Colours::grey)); | |||||
| rsaGroup.setColour (GroupComponent::textColourId, | |||||
| getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::defaultText, | |||||
| Colours::white)); | |||||
| rsaResultBox.setColour (TextEditor::backgroundColourId, | |||||
| getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::widgetBackground, | |||||
| Colours::white.withAlpha (0.5f))); | |||||
| bitSizeLabel.setText ("Num Bits to Use:", dontSendNotification); | bitSizeLabel.setText ("Num Bits to Use:", dontSendNotification); | ||||
| bitSizeLabel.attachToComponent (&bitSize, true); | bitSizeLabel.attachToComponent (&bitSize, true); | ||||
| @@ -47,7 +55,6 @@ public: | |||||
| generateRSAButton.addListener (this); | generateRSAButton.addListener (this); | ||||
| addAndMakeVisible (rsaResultBox); | addAndMakeVisible (rsaResultBox); | ||||
| rsaResultBox.setColour (TextEditor::backgroundColourId, Colours::white.withAlpha (0.5f)); | |||||
| rsaResultBox.setReadOnly (true); | rsaResultBox.setReadOnly (true); | ||||
| rsaResultBox.setMultiLine (true); | rsaResultBox.setMultiLine (true); | ||||
| } | } | ||||
| @@ -123,12 +130,19 @@ public: | |||||
| { | { | ||||
| addAndMakeVisible (hashGroup); | addAndMakeVisible (hashGroup); | ||||
| hashGroup.setText ("Hashes"); | hashGroup.setText ("Hashes"); | ||||
| hashGroup.setColour (GroupComponent::outlineColourId, Colours::grey); | |||||
| hashGroup.setColour (GroupComponent::textColourId, Colours::white); | |||||
| hashGroup.setColour (GroupComponent::outlineColourId, | |||||
| getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::outline, | |||||
| Colours::grey)); | |||||
| hashGroup.setColour (GroupComponent::textColourId, | |||||
| getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::defaultText, | |||||
| Colours::white)); | |||||
| hashEntryBox.setColour (TextEditor::backgroundColourId, | |||||
| getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::widgetBackground, | |||||
| Colours::white.withAlpha (0.5f))); | |||||
| addAndMakeVisible (hashEntryBox); | addAndMakeVisible (hashEntryBox); | ||||
| hashEntryBox.setMultiLine (true); | hashEntryBox.setMultiLine (true); | ||||
| hashEntryBox.setColour (TextEditor::backgroundColourId, Colours::white.withAlpha (0.5f)); | |||||
| hashEntryBox.setReturnKeyStartsNewLine (true); | hashEntryBox.setReturnKeyStartsNewLine (true); | ||||
| hashEntryBox.setText ("Type some text in this box and the resulting MD5, SHA and Whirlpool hashes will update below"); | hashEntryBox.setText ("Type some text in this box and the resulting MD5, SHA and Whirlpool hashes will update below"); | ||||
| @@ -213,7 +227,8 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| g.fillAll (Colour::greyLevel (0.4f)); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground, | |||||
| Colour::greyLevel (0.4f))); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| @@ -156,7 +156,7 @@ public: | |||||
| //============================================================================== | //============================================================================== | ||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| fillStandardDemoBackground (g); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground)); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| @@ -158,8 +158,8 @@ struct FlexBoxDemo : public juce::Component, | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| g.fillAll (Colours::lightgrey); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground, | |||||
| Colours::lightgrey)); | |||||
| g.setColour (Colours::white); | g.setColour (Colours::white); | ||||
| g.fillRect (getFlexBoxBounds()); | g.fillRect (getFlexBoxBounds()); | ||||
| } | } | ||||
| @@ -34,12 +34,6 @@ class FontsDemo : public Component, | |||||
| { | { | ||||
| public: | public: | ||||
| FontsDemo() | FontsDemo() | ||||
| : heightLabel (String(), "Height:"), | |||||
| kerningLabel (String(), "Kerning:"), | |||||
| scaleLabel (String(), "Scale:"), | |||||
| styleLabel ("Style"), | |||||
| boldToggle ("Bold"), | |||||
| italicToggle ("Italic") | |||||
| { | { | ||||
| setOpaque (true); | setOpaque (true); | ||||
| @@ -71,6 +65,9 @@ public: | |||||
| listBox.setRowHeight (20); | listBox.setRowHeight (20); | ||||
| listBox.setModel (this); // Tell the listbox where to get its data model | listBox.setModel (this); // Tell the listbox where to get its data model | ||||
| listBox.setColour (ListBox::textColourId, Colours::black); | |||||
| listBox.setColour (ListBox::backgroundColourId, Colours::white); | |||||
| heightSlider.setRange (3.0, 150.0, 0.01); | heightSlider.setRange (3.0, 150.0, 0.01); | ||||
| scaleSlider.setRange (0.2, 3.0, 0.01); | scaleSlider.setRange (0.2, 3.0, 0.01); | ||||
| @@ -106,17 +103,19 @@ public: | |||||
| "non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."); | "non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."); | ||||
| demoTextBox.setCaretPosition (0); | demoTextBox.setCaretPosition (0); | ||||
| demoTextBox.setColour (TextEditor::textColourId, Colours::black); | |||||
| demoTextBox.setColour (TextEditor::backgroundColourId, Colours::white); | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| fillStandardDemoBackground (g); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground)); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| { | { | ||||
| Rectangle<int> r (getLocalBounds().reduced (5)); | |||||
| auto r = getLocalBounds().reduced (5); | |||||
| // lay out the list box and vertical divider.. | // lay out the list box and vertical divider.. | ||||
| Component* vcomps[] = { &listBox, verticalDividerBar, nullptr }; | Component* vcomps[] = { &listBox, verticalDividerBar, nullptr }; | ||||
| @@ -134,7 +133,7 @@ public: | |||||
| const int labelWidth = 60; | const int labelWidth = 60; | ||||
| Rectangle<int> row (r.removeFromBottom (30)); | |||||
| auto row = r.removeFromBottom (30); | |||||
| row.removeFromLeft (labelWidth); | row.removeFromLeft (labelWidth); | ||||
| boldToggle.setBounds (row.removeFromLeft (row.getWidth() / 2)); | boldToggle.setBounds (row.removeFromLeft (row.getWidth() / 2)); | ||||
| italicToggle.setBounds (row); | italicToggle.setBounds (row); | ||||
| @@ -174,7 +173,7 @@ public: | |||||
| if (rowIsSelected) | if (rowIsSelected) | ||||
| g.fillAll (Colours::lightblue); | g.fillAll (Colours::lightblue); | ||||
| Font font (fonts [rowNumber]); | |||||
| Font font (fonts[rowNumber]); | |||||
| AttributedString s; | AttributedString s; | ||||
| s.setWordWrap (AttributedString::none); | s.setWordWrap (AttributedString::none); | ||||
| @@ -196,9 +195,16 @@ private: | |||||
| ListBox listBox; | ListBox listBox; | ||||
| TextEditor demoTextBox; | TextEditor demoTextBox; | ||||
| Label heightLabel, kerningLabel, scaleLabel, styleLabel; | |||||
| Label heightLabel {{}, "Height:" }, | |||||
| kerningLabel {{}, "Kerning:" }, | |||||
| scaleLabel { "Scale:" }, | |||||
| styleLabel { "Style" }; | |||||
| ToggleButton boldToggle { "Bold" }, | |||||
| italicToggle { "Italic" }; | |||||
| Slider heightSlider, kerningSlider, scaleSlider; | Slider heightSlider, kerningSlider, scaleSlider; | ||||
| ToggleButton boldToggle, italicToggle; | |||||
| ComboBox styleBox; | ComboBox styleBox; | ||||
| StretchableLayoutManager verticalLayout; | StretchableLayoutManager verticalLayout; | ||||
| @@ -45,17 +45,17 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| fillStandardDemoBackground (g); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground)); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| { | { | ||||
| Rectangle<int> r (getLocalBounds().reduced (4)); | |||||
| auto r = getLocalBounds().reduced (4); | |||||
| int buttonHeight = 22; | int buttonHeight = 22; | ||||
| Rectangle<int> columns (r.removeFromTop (buttonHeight * 4)); | |||||
| Rectangle<int> col (columns.removeFromLeft (200)); | |||||
| auto columns = r.removeFromTop (buttonHeight * 4); | |||||
| auto col = columns.removeFromLeft (200); | |||||
| animatePosition.setBounds (col.removeFromTop (buttonHeight)); | animatePosition.setBounds (col.removeFromTop (buttonHeight)); | ||||
| animateRotation.setBounds (col.removeFromTop (buttonHeight)); | animateRotation.setBounds (col.removeFromTop (buttonHeight)); | ||||
| @@ -630,7 +630,6 @@ public: | |||||
| addAndMakeVisible (listBox); | addAndMakeVisible (listBox); | ||||
| listBox.setModel (this); | listBox.setModel (this); | ||||
| listBox.selectRow (0); | listBox.selectRow (0); | ||||
| listBox.setColour (ListBox::backgroundColourId, Colour::greyLevel (0.9f)); | |||||
| } | } | ||||
| void resized() | void resized() | ||||
| @@ -645,14 +644,13 @@ public: | |||||
| void paintListBoxItem (int rowNumber, Graphics& g, int width, int height, bool rowIsSelected) | void paintListBoxItem (int rowNumber, Graphics& g, int width, int height, bool rowIsSelected) | ||||
| { | { | ||||
| Component* demo = demos [rowNumber]; | |||||
| if (demo != nullptr) | |||||
| if (auto* demo = demos[rowNumber]) | |||||
| { | { | ||||
| if (rowIsSelected) | if (rowIsSelected) | ||||
| g.fillAll (findColour (TextEditor::highlightColourId)); | |||||
| g.fillAll (Colour::contrasting (findColour (ListBox::textColourId), | |||||
| findColour (ListBox::backgroundColourId))); | |||||
| g.setColour (Colours::black); | |||||
| g.setColour (findColour (ListBox::textColourId)); | |||||
| g.setFont (14.0f); | g.setFont (14.0f); | ||||
| g.drawFittedText (demo->getName(), 8, 0, width - 10, height, Justification::centredLeft, 2); | g.drawFittedText (demo->getName(), 8, 0, width - 10, height, Justification::centredLeft, 2); | ||||
| } | } | ||||
| @@ -693,7 +691,7 @@ public: | |||||
| void resized() override | void resized() override | ||||
| { | { | ||||
| Rectangle<int> area (getLocalBounds()); | |||||
| auto area = getLocalBounds(); | |||||
| controllersComponent.setBounds (area.removeFromBottom (150)); | controllersComponent.setBounds (area.removeFromBottom (150)); | ||||
| testList.setBounds (area.removeFromRight (150)); | testList.setBounds (area.removeFromRight (150)); | ||||
| demoHolder.setBounds (area); | demoHolder.setBounds (area); | ||||
| @@ -41,7 +41,7 @@ public: | |||||
| directoryThread.startThread (1); | directoryThread.startThread (1); | ||||
| fileTree.addListener (this); | fileTree.addListener (this); | ||||
| fileTree.setColour (TreeView::backgroundColourId, Colours::lightgrey.withAlpha (0.6f)); | |||||
| fileTree.setColour (TreeView::backgroundColourId, Colours::grey); | |||||
| addAndMakeVisible (fileTree); | addAndMakeVisible (fileTree); | ||||
| addAndMakeVisible (resizerBar); | addAndMakeVisible (resizerBar); | ||||
| @@ -68,12 +68,12 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| fillStandardDemoBackground (g); | |||||
| g.fillAll (Colours::white); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| { | { | ||||
| Rectangle<int> r (getLocalBounds().reduced (4)); | |||||
| auto r = getLocalBounds().reduced (4); | |||||
| // make a list of two of our child components that we want to reposition | // make a list of two of our child components that we want to reposition | ||||
| Component* comps[] = { &fileTree, &resizerBar, &imagePreview }; | Component* comps[] = { &fileTree, &resizerBar, &imagePreview }; | ||||
| @@ -125,7 +125,7 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| fillStandardDemoBackground (g); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground)); | |||||
| } | } | ||||
| private: | private: | ||||
| @@ -34,11 +34,16 @@ public: | |||||
| { | { | ||||
| setOpaque (true); | setOpaque (true); | ||||
| addAndMakeVisible (keyMappingEditor); | addAndMakeVisible (keyMappingEditor); | ||||
| LookAndFeel* lf = &LookAndFeel::getDefaultLookAndFeel(); | |||||
| keyMappingEditor.setColours (lf->findColour (KeyMappingEditorComponent::backgroundColourId), | |||||
| lf->findColour (KeyMappingEditorComponent::textColourId)); | |||||
| } | } | ||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| g.fillAll (Colour::greyLevel (0.93f)); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground, | |||||
| Colour::greyLevel (0.93f))); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| @@ -78,7 +78,7 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| fillStandardDemoBackground (g); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground)); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| @@ -32,7 +32,7 @@ | |||||
| It's a good idea not to hard code your colours, use the findColour method along with appropriate | It's a good idea not to hard code your colours, use the findColour method along with appropriate | ||||
| ColourIds so you can set these on a per-component basis. | ColourIds so you can set these on a per-component basis. | ||||
| */ | */ | ||||
| struct CustomLookAndFeel : public LookAndFeel_V3 | |||||
| struct CustomLookAndFeel : public LookAndFeel_V4 | |||||
| { | { | ||||
| void drawRoundThumb (Graphics& g, const float x, const float y, | void drawRoundThumb (Graphics& g, const float x, const float y, | ||||
| const float diameter, const Colour& colour, float outlineThickness) | const float diameter, const Colour& colour, float outlineThickness) | ||||
| @@ -116,7 +116,7 @@ struct CustomLookAndFeel : public LookAndFeel_V3 | |||||
| if (ticked) | if (ticked) | ||||
| { | { | ||||
| const Path tick (LookAndFeel_V2::getTickShape (6.0f)); | |||||
| const Path tick (LookAndFeel_V4::getTickShape (6.0f)); | |||||
| g.setColour (isEnabled ? findColour (TextButton::buttonOnColourId) : Colours::grey); | g.setColour (isEnabled ? findColour (TextButton::buttonOnColourId) : Colours::grey); | ||||
| const float scale = 9.0f; | const float scale = 9.0f; | ||||
| @@ -315,7 +315,7 @@ struct SquareLookAndFeel : public CustomLookAndFeel | |||||
| if (ticked) | if (ticked) | ||||
| { | { | ||||
| const Path tick (LookAndFeel_V3::getTickShape (6.0f)); | |||||
| const Path tick (LookAndFeel_V4::getTickShape (6.0f)); | |||||
| g.setColour (isEnabled ? findColour (TextButton::buttonColourId) : Colours::grey); | g.setColour (isEnabled ? findColour (TextButton::buttonColourId) : Colours::grey); | ||||
| const AffineTransform trans (RectanglePlacement (RectanglePlacement::centred) | const AffineTransform trans (RectanglePlacement (RectanglePlacement::centred) | ||||
| @@ -509,6 +509,10 @@ public: | |||||
| addLookAndFeel (new LookAndFeel_V1(), "LookAndFeel_V1"); | addLookAndFeel (new LookAndFeel_V1(), "LookAndFeel_V1"); | ||||
| addLookAndFeel (new LookAndFeel_V2(), "LookAndFeel_V2"); | addLookAndFeel (new LookAndFeel_V2(), "LookAndFeel_V2"); | ||||
| addLookAndFeel (new LookAndFeel_V3(), "LookAndFeel_V3"); | addLookAndFeel (new LookAndFeel_V3(), "LookAndFeel_V3"); | ||||
| addLookAndFeel (new LookAndFeel_V4(), "LookAndFeel_V4 (Dark)"); | |||||
| addLookAndFeel (new LookAndFeel_V4 (LookAndFeel_V4::getMidnightColourScheme()), "LookAndFeel_V4 (Midnight)"); | |||||
| addLookAndFeel (new LookAndFeel_V4 (LookAndFeel_V4::getGreyColourScheme()), "LookAndFeel_V4 (Grey)"); | |||||
| addLookAndFeel (new LookAndFeel_V4 (LookAndFeel_V4::getLightColourScheme()), "LookAndFeel_V4 (Light)"); | |||||
| CustomLookAndFeel* claf = new CustomLookAndFeel(); | CustomLookAndFeel* claf = new CustomLookAndFeel(); | ||||
| addLookAndFeel (claf, "Custom Look And Feel"); | addLookAndFeel (claf, "Custom Look And Feel"); | ||||
| @@ -528,7 +532,8 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| g.fillAll (Colour::greyLevel (0.4f)); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground, | |||||
| Colour::greyLevel (0.4f))); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| @@ -189,7 +189,7 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| fillStandardDemoBackground (g); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground)); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| @@ -42,7 +42,8 @@ public: | |||||
| if (isPositiveAndBelow (row, midiMessageList.size())) | if (isPositiveAndBelow (row, midiMessageList.size())) | ||||
| { | { | ||||
| g.setColour (Colours::black); | |||||
| g.setColour (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::defaultText, | |||||
| Colours::black)); | |||||
| const MidiMessage& message = midiMessageList.getReference (row); | const MidiMessage& message = midiMessageList.getReference (row); | ||||
| double time = message.getTimeStamp(); | double time = message.getTimeStamp(); | ||||
| @@ -120,8 +121,6 @@ public: | |||||
| addAndMakeVisible (messageListBox); | addAndMakeVisible (messageListBox); | ||||
| messageListBox.setModel (&midiLogListBoxModel); | messageListBox.setModel (&midiLogListBoxModel); | ||||
| messageListBox.setColour (ListBox::backgroundColourId, Colour (0x32ffffff)); | |||||
| messageListBox.setColour (ListBox::outlineColourId, Colours::black); | |||||
| } | } | ||||
| ~MidiDemo() | ~MidiDemo() | ||||
| @@ -133,7 +132,7 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| fillStandardDemoBackground (g); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground)); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| @@ -36,9 +36,11 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| g.fillAll (Colour::greyLevel (0.4f)); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground, | |||||
| Colour::greyLevel (0.4f))); | |||||
| g.setColour (Colours::lightgrey); | |||||
| g.setColour (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::defaultText, | |||||
| Colours::lightgrey)); | |||||
| g.setFont (14.0f); | g.setFont (14.0f); | ||||
| g.drawFittedText ("Drag here with as many fingers as you have!", | g.drawFittedText ("Drag here with as many fingers as you have!", | ||||
| getLocalBounds().reduced (30), Justification::centred, 4); | getLocalBounds().reduced (30), Justification::centred, 4); | ||||
| @@ -244,7 +244,7 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| fillStandardDemoBackground (g); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground)); | |||||
| } | } | ||||
| private: | private: | ||||
| @@ -51,7 +51,7 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| fillStandardDemoBackground (g); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground)); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| @@ -344,7 +344,6 @@ struct OpenGLDemoClasses | |||||
| { | { | ||||
| addAndMakeVisible (statusLabel); | addAndMakeVisible (statusLabel); | ||||
| statusLabel.setJustificationType (Justification::topLeft); | statusLabel.setJustificationType (Justification::topLeft); | ||||
| statusLabel.setColour (Label::textColourId, Colours::black); | |||||
| statusLabel.setFont (Font (14.0f)); | statusLabel.setFont (Font (14.0f)); | ||||
| addAndMakeVisible (sizeSlider); | addAndMakeVisible (sizeSlider); | ||||
| @@ -367,7 +366,9 @@ struct OpenGLDemoClasses | |||||
| addAndMakeVisible (showBackgroundToggle); | addAndMakeVisible (showBackgroundToggle); | ||||
| showBackgroundToggle.addListener (this); | showBackgroundToggle.addListener (this); | ||||
| Colour editorBackground (Colours::white.withAlpha (0.6f)); | |||||
| Colour editorBackground = dynamic_cast<LookAndFeel_V4*> (&LookAndFeel::getDefaultLookAndFeel()) | |||||
| ? getLookAndFeel().findColour (ResizableWindow::backgroundColourId) | |||||
| : Colours::white; | |||||
| addAndMakeVisible (tabbedComp); | addAndMakeVisible (tabbedComp); | ||||
| tabbedComp.setTabBarDepth (25); | tabbedComp.setTabBarDepth (25); | ||||
| @@ -645,7 +646,9 @@ struct OpenGLDemoClasses | |||||
| jassert (OpenGLHelpers::isContextActive()); | jassert (OpenGLHelpers::isContextActive()); | ||||
| const float desktopScale = (float) openGLContext.getRenderingScale(); | const float desktopScale = (float) openGLContext.getRenderingScale(); | ||||
| OpenGLHelpers::clear (Colours::lightblue); | |||||
| OpenGLHelpers::clear (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground, | |||||
| Colours::lightblue)); | |||||
| if (textureToUse != nullptr) | if (textureToUse != nullptr) | ||||
| if (! textureToUse->applyTo (texture)) | if (! textureToUse->applyTo (texture)) | ||||
| @@ -43,7 +43,6 @@ public: | |||||
| addAndMakeVisible (statusLabel); | addAndMakeVisible (statusLabel); | ||||
| statusLabel.setJustificationType (Justification::topLeft); | statusLabel.setJustificationType (Justification::topLeft); | ||||
| statusLabel.setColour (Label::textColourId, Colours::black); | |||||
| statusLabel.setFont (Font (14.0f)); | statusLabel.setFont (Font (14.0f)); | ||||
| Array<ShaderPreset> presets (getPresets()); | Array<ShaderPreset> presets (getPresets()); | ||||
| @@ -59,8 +58,6 @@ public: | |||||
| addAndMakeVisible (presetBox); | addAndMakeVisible (presetBox); | ||||
| presetBox.addListener (this); | presetBox.addListener (this); | ||||
| Colour editorBackground (Colours::white.withAlpha (0.6f)); | |||||
| fragmentEditorComp.setColour (CodeEditorComponent::backgroundColourId, editorBackground); | |||||
| fragmentEditorComp.setOpaque (false); | fragmentEditorComp.setOpaque (false); | ||||
| fragmentDocument.addListener (this); | fragmentDocument.addListener (this); | ||||
| addAndMakeVisible (fragmentEditorComp); | addAndMakeVisible (fragmentEditorComp); | ||||
| @@ -158,7 +158,8 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| g.fillAll (Colour::greyLevel (0.8f)); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground, | |||||
| Colour::greyLevel (0.8f))); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| @@ -212,7 +213,8 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| g.fillAll (Colour::greyLevel (0.8f)); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground, | |||||
| Colour::greyLevel (0.8f))); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| @@ -223,7 +225,7 @@ public: | |||||
| void timerCallback() override | void timerCallback() override | ||||
| { | { | ||||
| stopTimer(); | stopTimer(); | ||||
| concertinaPanel.expandPanelFully (concertinaPanel.getPanel(0), true); | |||||
| concertinaPanel.expandPanelFully (concertinaPanel.getPanel (0), true); | |||||
| } | } | ||||
| private: | private: | ||||
| @@ -188,7 +188,8 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| g.fillAll (Colour::greyLevel (0.93f)); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground, | |||||
| Colour::greyLevel (0.93f))); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| @@ -192,7 +192,8 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| g.fillAll (Colours::darkgrey); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground, | |||||
| Colours::darkgrey)); | |||||
| } | } | ||||
| void paintOverChildren (Graphics& g) override | void paintOverChildren (Graphics& g) override | ||||
| @@ -205,7 +206,8 @@ public: | |||||
| s.append ("Click the \"Set Random Colour\" button to change the colour of one of the circles."); | s.append ("Click the \"Set Random Colour\" button to change the colour of one of the circles."); | ||||
| s.append (newLine); | s.append (newLine); | ||||
| s.setFont (Font (16.0f)); | s.setFont (Font (16.0f)); | ||||
| s.setColour (Colours::lightgrey); | |||||
| s.setColour (getUIColourIfAvailable(LookAndFeel_V4::ColourScheme::UIColour::defaultText, | |||||
| Colours::lightgrey)); | |||||
| s.draw (g, explanationArea.reduced (10).toFloat()); | s.draw (g, explanationArea.reduced (10).toFloat()); | ||||
| } | } | ||||
| @@ -126,7 +126,8 @@ struct UnitTestClasses | |||||
| //============================================================================== | //============================================================================== | ||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| g.fillAll (Colours::grey); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground, | |||||
| Colours::grey)); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| @@ -48,7 +48,8 @@ public: | |||||
| void paintItem (Graphics& g, int width, int height) override | void paintItem (Graphics& g, int width, int height) override | ||||
| { | { | ||||
| g.setColour (Colours::black); | |||||
| g.setColour (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::defaultText, | |||||
| Colours::black)); | |||||
| g.setFont (15.0f); | g.setFont (15.0f); | ||||
| g.drawText (tree["name"].toString(), | g.drawText (tree["name"].toString(), | ||||
| @@ -168,7 +169,6 @@ public: | |||||
| tree.setDefaultOpenness (true); | tree.setDefaultOpenness (true); | ||||
| tree.setMultiSelectEnabled (true); | tree.setMultiSelectEnabled (true); | ||||
| tree.setRootItem (rootItem = new ValueTreeItem (createRootValueTree(), undoManager)); | tree.setRootItem (rootItem = new ValueTreeItem (createRootValueTree(), undoManager)); | ||||
| tree.setColour (TreeView::backgroundColourId, Colours::white); | |||||
| addAndMakeVisible (undoButton); | addAndMakeVisible (undoButton); | ||||
| addAndMakeVisible (redoButton); | addAndMakeVisible (redoButton); | ||||
| @@ -185,7 +185,7 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| fillStandardDemoBackground (g); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground)); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| @@ -137,7 +137,7 @@ public: | |||||
| directoryThread.startThread (1); | directoryThread.startThread (1); | ||||
| fileTree.addListener (this); | fileTree.addListener (this); | ||||
| fileTree.setColour (TreeView::backgroundColourId, Colours::lightgrey); | |||||
| fileTree.setColour (FileTreeComponent::backgroundColourId, Colours::lightgrey.withAlpha (0.6f)); | |||||
| addAndMakeVisible (fileTree); | addAndMakeVisible (fileTree); | ||||
| addAndMakeVisible (resizerBar); | addAndMakeVisible (resizerBar); | ||||
| @@ -176,7 +176,7 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| fillStandardDemoBackground (g); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground)); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| @@ -100,7 +100,8 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| g.fillAll (Colours::grey); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground, | |||||
| Colours::grey)); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| @@ -42,6 +42,7 @@ static void showBubbleMessage (Component* targetComponent, const String& textToS | |||||
| AttributedString text (textToShow); | AttributedString text (textToShow); | ||||
| text.setJustification (Justification::centred); | text.setJustification (Justification::centred); | ||||
| text.setColour (targetComponent->findColour (TextButton::textColourOffId)); | |||||
| bmc->showAt (targetComponent, text, 2000, true, false); | bmc->showAt (targetComponent, text, 2000, true, false); | ||||
| } | } | ||||
| @@ -278,6 +279,8 @@ struct ButtonsPage : public Component, | |||||
| tb->setClickingTogglesState (true); | tb->setClickingTogglesState (true); | ||||
| tb->setRadioGroupId (34567); | tb->setRadioGroupId (34567); | ||||
| tb->setColour (TextButton::textColourOffId, Colours::black); | |||||
| tb->setColour (TextButton::textColourOnId, Colours::black); | |||||
| tb->setColour (TextButton::buttonColourId, Colours::white); | tb->setColour (TextButton::buttonColourId, Colours::white); | ||||
| tb->setColour (TextButton::buttonOnColourId, Colours::blueviolet.brighter()); | tb->setColour (TextButton::buttonOnColourId, Colours::blueviolet.brighter()); | ||||
| @@ -745,10 +748,12 @@ public: | |||||
| // This is overloaded from TableListBoxModel, and should fill in the background of the whole row | // This is overloaded from TableListBoxModel, and should fill in the background of the whole row | ||||
| void paintRowBackground (Graphics& g, int rowNumber, int /*width*/, int /*height*/, bool rowIsSelected) override | void paintRowBackground (Graphics& g, int rowNumber, int /*width*/, int /*height*/, bool rowIsSelected) override | ||||
| { | { | ||||
| const Colour alternateColour (getLookAndFeel().findColour (ListBox::backgroundColourId) | |||||
| .interpolatedWith (getLookAndFeel().findColour (ListBox::textColourId), 0.03f)); | |||||
| if (rowIsSelected) | if (rowIsSelected) | ||||
| g.fillAll (Colours::lightblue); | g.fillAll (Colours::lightblue); | ||||
| else if (rowNumber % 2) | else if (rowNumber % 2) | ||||
| g.fillAll (Colour (0xffeeeeee)); | |||||
| g.fillAll (alternateColour); | |||||
| } | } | ||||
| // This is overloaded from TableListBoxModel, and must paint any cells that aren't using custom | // This is overloaded from TableListBoxModel, and must paint any cells that aren't using custom | ||||
| @@ -756,7 +761,7 @@ public: | |||||
| void paintCell (Graphics& g, int rowNumber, int columnId, | void paintCell (Graphics& g, int rowNumber, int columnId, | ||||
| int width, int height, bool /*rowIsSelected*/) override | int width, int height, bool /*rowIsSelected*/) override | ||||
| { | { | ||||
| g.setColour (Colours::black); | |||||
| g.setColour (getLookAndFeel().findColour (ListBox::textColourId)); | |||||
| g.setFont (font); | g.setFont (font); | ||||
| if (const XmlElement* rowElement = dataList->getChildElement (rowNumber)) | if (const XmlElement* rowElement = dataList->getChildElement (rowNumber)) | ||||
| @@ -766,7 +771,7 @@ public: | |||||
| g.drawText (text, 2, 0, width - 4, height, Justification::centredLeft, true); | g.drawText (text, 2, 0, width - 4, height, Justification::centredLeft, true); | ||||
| } | } | ||||
| g.setColour (Colours::black.withAlpha (0.2f)); | |||||
| g.setColour (getLookAndFeel().findColour (ListBox::backgroundColourId)); | |||||
| g.fillRect (width - 1, 0, 1, height); | g.fillRect (width - 1, 0, 1, height); | ||||
| } | } | ||||
| @@ -888,7 +893,6 @@ private: | |||||
| { | { | ||||
| // double click to edit the label text; single click handled below | // double click to edit the label text; single click handled below | ||||
| setEditable (false, true, false); | setEditable (false, true, false); | ||||
| setColour (textColourId, Colours::black); | |||||
| } | } | ||||
| void mouseDown (const MouseEvent& event) override | void mouseDown (const MouseEvent& event) override | ||||
| @@ -912,12 +916,21 @@ private: | |||||
| setText (owner.getText(columnId, row), dontSendNotification); | setText (owner.getText(columnId, row), dontSendNotification); | ||||
| } | } | ||||
| void paint (Graphics& g) override | |||||
| { | |||||
| auto& lf = getLookAndFeel(); | |||||
| if (! dynamic_cast<LookAndFeel_V4*> (&lf)) | |||||
| lf.setColour (textColourId, Colours::black); | |||||
| Label::paint (g); | |||||
| } | |||||
| private: | private: | ||||
| TableDemoComponent& owner; | TableDemoComponent& owner; | ||||
| int row, columnId; | int row, columnId; | ||||
| Colour textColour; | |||||
| }; | }; | ||||
| //============================================================================== | //============================================================================== | ||||
| // This is a custom component containing a combo box, which we're going to put inside | // This is a custom component containing a combo box, which we're going to put inside | ||||
| // our table's "rating" column. | // our table's "rating" column. | ||||
| @@ -1063,7 +1076,7 @@ private: | |||||
| if (rowIsSelected) | if (rowIsSelected) | ||||
| g.fillAll (Colours::lightblue); | g.fillAll (Colours::lightblue); | ||||
| g.setColour (Colours::black); | |||||
| g.setColour (LookAndFeel::getDefaultLookAndFeel().findColour (Label::textColourId)); | |||||
| g.setFont (height * 0.7f); | g.setFont (height * 0.7f); | ||||
| g.drawText ("Draggable Thing #" + String (rowNumber + 1), | g.drawText ("Draggable Thing #" + String (rowNumber + 1), | ||||
| @@ -1110,7 +1123,7 @@ private: | |||||
| g.drawRect (getLocalBounds(), 3); | g.drawRect (getLocalBounds(), 3); | ||||
| } | } | ||||
| g.setColour (Colours::black); | |||||
| g.setColour (getLookAndFeel().findColour (Label::textColourId)); | |||||
| g.setFont (14.0f); | g.setFont (14.0f); | ||||
| g.drawFittedText (message, getLocalBounds().reduced (10, 0), Justification::centred, 4); | g.drawFittedText (message, getLocalBounds().reduced (10, 0), Justification::centred, 4); | ||||
| } | } | ||||
| @@ -1235,6 +1248,7 @@ private: | |||||
| //============================================================================== | //============================================================================== | ||||
| class MenusDemo : public Component, | class MenusDemo : public Component, | ||||
| public MenuBarModel, | public MenuBarModel, | ||||
| public ChangeBroadcaster, | |||||
| private Button::Listener | private Button::Listener | ||||
| { | { | ||||
| public: | public: | ||||
| @@ -1296,6 +1310,15 @@ public: | |||||
| menu.addCommandItem (commandManager, MainAppWindow::useLookAndFeelV1); | menu.addCommandItem (commandManager, MainAppWindow::useLookAndFeelV1); | ||||
| menu.addCommandItem (commandManager, MainAppWindow::useLookAndFeelV2); | menu.addCommandItem (commandManager, MainAppWindow::useLookAndFeelV2); | ||||
| menu.addCommandItem (commandManager, MainAppWindow::useLookAndFeelV3); | menu.addCommandItem (commandManager, MainAppWindow::useLookAndFeelV3); | ||||
| PopupMenu v4SubMenu; | |||||
| v4SubMenu.addCommandItem (commandManager, MainAppWindow::useLookAndFeelV4Dark); | |||||
| v4SubMenu.addCommandItem (commandManager, MainAppWindow::useLookAndFeelV4Midnight); | |||||
| v4SubMenu.addCommandItem (commandManager, MainAppWindow::useLookAndFeelV4Grey); | |||||
| v4SubMenu.addCommandItem (commandManager, MainAppWindow::useLookAndFeelV4Light); | |||||
| menu.addSubMenu ("Use LookAndFeel_V4", v4SubMenu); | |||||
| menu.addSeparator(); | menu.addSeparator(); | ||||
| menu.addCommandItem (commandManager, MainAppWindow::useNativeTitleBar); | menu.addCommandItem (commandManager, MainAppWindow::useNativeTitleBar); | ||||
| @@ -1371,6 +1394,10 @@ public: | |||||
| tabs->setOrientation (o); | tabs->setOrientation (o); | ||||
| } | } | ||||
| } | } | ||||
| else if (menuItemID >= 12298 && menuItemID <= 12305) | |||||
| { | |||||
| sendChangeMessage(); | |||||
| } | |||||
| } | } | ||||
| private: | private: | ||||
| @@ -1466,26 +1493,35 @@ private: | |||||
| }; | }; | ||||
| //============================================================================== | //============================================================================== | ||||
| class DemoTabbedComponent : public TabbedComponent | |||||
| class DemoTabbedComponent : public TabbedComponent, | |||||
| private ChangeListener | |||||
| { | { | ||||
| public: | public: | ||||
| DemoTabbedComponent() | DemoTabbedComponent() | ||||
| : TabbedComponent (TabbedButtonBar::TabsAtTop) | : TabbedComponent (TabbedButtonBar::TabsAtTop) | ||||
| { | { | ||||
| addTab ("Menus", getRandomTabBackgroundColour(), new MenusDemo(), true); | |||||
| addTab ("Buttons", getRandomTabBackgroundColour(), new ButtonsPage(), true); | |||||
| addTab ("Sliders", getRandomTabBackgroundColour(), new SlidersPage(), true); | |||||
| addTab ("Toolbars", getRandomTabBackgroundColour(), new ToolbarDemoComp(), true); | |||||
| addTab ("Misc", getRandomTabBackgroundColour(), new MiscPage(), true); | |||||
| addTab ("Tables", getRandomTabBackgroundColour(), new TableDemoComponent(), true); | |||||
| addTab ("Drag & Drop", getRandomTabBackgroundColour(), new DragAndDropDemo(), true); | |||||
| // Register this class as a ChangeListener to the menus demo so we can update the tab colours when the LookAndFeel is changed | |||||
| menusDemo = new MenusDemo(); | |||||
| menusDemo->addChangeListener (this); | |||||
| const Colour c; | |||||
| addTab ("Menus", c, menusDemo, true); | |||||
| addTab ("Buttons", c, new ButtonsPage(), true); | |||||
| addTab ("Sliders", c, new SlidersPage(), true); | |||||
| addTab ("Toolbars", c, new ToolbarDemoComp(), true); | |||||
| addTab ("Misc", c, new MiscPage(), true); | |||||
| addTab ("Tables", c, new TableDemoComponent(), true); | |||||
| addTab ("Drag & Drop", c, new DragAndDropDemo(), true); | |||||
| updateTabColours(); | |||||
| getTabbedButtonBar().getTabButton (5)->setExtraComponent (new CustomTabButton(), TabBarButton::afterText); | getTabbedButtonBar().getTabButton (5)->setExtraComponent (new CustomTabButton(), TabBarButton::afterText); | ||||
| } | } | ||||
| static Colour getRandomTabBackgroundColour() | |||||
| void changeListenerCallback (ChangeBroadcaster* source) override | |||||
| { | { | ||||
| return Colour (Random::getSystemRandom().nextFloat(), 0.1f, 0.97f, 1.0f); | |||||
| if (dynamic_cast<MenusDemo*> (source) != nullptr) | |||||
| updateTabColours(); | |||||
| } | } | ||||
| // This is a small star button that is put inside one of the tabs. You can | // This is a small star button that is put inside one of the tabs. You can | ||||
| @@ -1519,12 +1555,26 @@ public: | |||||
| private: | private: | ||||
| ScopedPointer<BubbleMessageComponent> bubbleMessage; | ScopedPointer<BubbleMessageComponent> bubbleMessage; | ||||
| }; | }; | ||||
| private: | |||||
| ScopedPointer<MenusDemo> menusDemo; //need to have keep a pointer around to register this class as a ChangeListener | |||||
| void updateTabColours() | |||||
| { | |||||
| bool randomiseColours = ! dynamic_cast<LookAndFeel_V4*> (&LookAndFeel::getDefaultLookAndFeel()); | |||||
| for (int i = 0; i < getNumTabs(); ++i) | |||||
| { | |||||
| if (randomiseColours) | |||||
| setTabBackgroundColour (i, Colour (Random::getSystemRandom().nextFloat(), 0.1f, 0.97f, 1.0f)); | |||||
| else | |||||
| setTabBackgroundColour (i, getLookAndFeel().findColour (ResizableWindow::backgroundColourId)); | |||||
| } | |||||
| } | |||||
| }; | }; | ||||
| //============================================================================== | //============================================================================== | ||||
| class WidgetsDemo : public Component | |||||
| struct WidgetsDemo : public Component | |||||
| { | { | ||||
| public: | |||||
| WidgetsDemo() | WidgetsDemo() | ||||
| { | { | ||||
| setOpaque (true); | setOpaque (true); | ||||
| @@ -1541,7 +1591,6 @@ public: | |||||
| tabs.setBounds (getLocalBounds().reduced (4)); | tabs.setBounds (getLocalBounds().reduced (4)); | ||||
| } | } | ||||
| private: | |||||
| DemoTabbedComponent tabs; | DemoTabbedComponent tabs; | ||||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WidgetsDemo) | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WidgetsDemo) | ||||
| @@ -229,7 +229,8 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| g.fillAll (Colours::grey); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground, | |||||
| Colours::grey)); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| @@ -254,7 +254,7 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| fillStandardDemoBackground (g); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground)); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| @@ -30,7 +30,6 @@ class IntroScreen : public Component | |||||
| { | { | ||||
| public: | public: | ||||
| IntroScreen() | IntroScreen() | ||||
| : linkButton ("www.juce.com", URL ("http://www.juce.com")) | |||||
| { | { | ||||
| setOpaque (true); | setOpaque (true); | ||||
| @@ -38,7 +37,7 @@ public: | |||||
| addAndMakeVisible (linkButton); | addAndMakeVisible (linkButton); | ||||
| addAndMakeVisible (logo); | addAndMakeVisible (logo); | ||||
| versionLabel.setColour (Label::textColourId, Colours::white); | |||||
| // versionLabel.setColour (Label::textColourId, Colours::white); | |||||
| versionLabel.setText (String ("{version} built on {date}") | versionLabel.setText (String ("{version} built on {date}") | ||||
| .replace ("{version}", SystemStats::getJUCEVersion()) | .replace ("{version}", SystemStats::getJUCEVersion()) | ||||
| .replace ("{date}", String (__DATE__).replace (" ", " ")), | .replace ("{date}", String (__DATE__).replace (" ", " ")), | ||||
| @@ -49,12 +48,12 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| g.fillAll (Colour (0xff4d4d4d)); | |||||
| g.fillAll (getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::windowBackground)); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| { | { | ||||
| Rectangle<int> area (getLocalBounds().reduced (10)); | |||||
| auto area = getLocalBounds().reduced (10); | |||||
| logo.setBounds (area); | logo.setBounds (area); | ||||
| area = area.removeFromBottom (24); | area = area.removeFromBottom (24); | ||||
| linkButton.setBounds (area.removeFromRight (getWidth() / 4)); | linkButton.setBounds (area.removeFromRight (getWidth() / 4)); | ||||
| @@ -63,13 +62,13 @@ public: | |||||
| private: | private: | ||||
| Label versionLabel; | Label versionLabel; | ||||
| HyperlinkButton linkButton; | |||||
| HyperlinkButton linkButton { "www.juce.com", URL ("http://www.juce.com") }; | |||||
| //============================================================================== | //============================================================================== | ||||
| struct LogoDrawComponent : public Component, | struct LogoDrawComponent : public Component, | ||||
| private Timer | private Timer | ||||
| { | { | ||||
| LogoDrawComponent() : logoPath (MainAppWindow::getJUCELogoPath()), elapsed (0.0f) | |||||
| LogoDrawComponent() | |||||
| { | { | ||||
| startTimerHz (30); // repaint at 30 fps | startTimerHz (30); // repaint at 30 fps | ||||
| } | } | ||||
| @@ -103,20 +102,18 @@ private: | |||||
| getLocalBounds().reduced (20, getHeight() / 4).toFloat())); | getLocalBounds().reduced (20, getHeight() / 4).toFloat())); | ||||
| } | } | ||||
| private: | |||||
| void timerCallback() override | void timerCallback() override | ||||
| { | { | ||||
| repaint(); | repaint(); | ||||
| elapsed += 0.02f; | elapsed += 0.02f; | ||||
| } | } | ||||
| Path logoPath; | |||||
| float elapsed; | |||||
| Path logoPath { MainAppWindow::getJUCELogoPath() }; | |||||
| float elapsed = 0; | |||||
| }; | }; | ||||
| LogoDrawComponent logo; | LogoDrawComponent logo; | ||||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (IntroScreen) | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (IntroScreen) | ||||
| }; | }; | ||||
| @@ -36,6 +36,7 @@ public: | |||||
| //============================================================================== | //============================================================================== | ||||
| void initialise (const String& commandLine) override | void initialise (const String& commandLine) override | ||||
| { | { | ||||
| // (This function call is for one of the demos, which involves launching a child process) | |||||
| if (invokeChildProcessDemo (commandLine)) | if (invokeChildProcessDemo (commandLine)) | ||||
| return; | return; | ||||
| @@ -55,10 +55,9 @@ Array<JuceDemoTypeBase*>& JuceDemoTypeBase::getDemoTypeList() | |||||
| #if JUCE_WINDOWS || JUCE_LINUX || JUCE_MAC | #if JUCE_WINDOWS || JUCE_LINUX || JUCE_MAC | ||||
| // Just add a simple icon to the Window system tray area or Mac menu bar.. | // Just add a simple icon to the Window system tray area or Mac menu bar.. | ||||
| class DemoTaskbarComponent : public SystemTrayIconComponent, | |||||
| private Timer | |||||
| struct DemoTaskbarComponent : public SystemTrayIconComponent, | |||||
| private Timer | |||||
| { | { | ||||
| public: | |||||
| DemoTaskbarComponent() | DemoTaskbarComponent() | ||||
| { | { | ||||
| setIconImage (ImageCache::getFromMemory (BinaryData::juce_icon_png, BinaryData::juce_icon_pngSize)); | setIconImage (ImageCache::getFromMemory (BinaryData::juce_icon_png, BinaryData::juce_icon_pngSize)); | ||||
| @@ -83,7 +82,6 @@ public: | |||||
| JUCEApplication::getInstance()->systemRequestedQuit(); | JUCEApplication::getInstance()->systemRequestedQuit(); | ||||
| } | } | ||||
| private: | |||||
| void timerCallback() override | void timerCallback() override | ||||
| { | { | ||||
| stopTimer(); | stopTimer(); | ||||
| @@ -113,13 +111,17 @@ public: | |||||
| lookAndFeelV3.setColour (Label::textColourId, Colours::white); | lookAndFeelV3.setColour (Label::textColourId, Colours::white); | ||||
| lookAndFeelV3.setColour (Label::textColourId, Colours::white); | lookAndFeelV3.setColour (Label::textColourId, Colours::white); | ||||
| lookAndFeelV3.setColour (ToggleButton::textColourId, Colours::white); | lookAndFeelV3.setColour (ToggleButton::textColourId, Colours::white); | ||||
| LookAndFeel::setDefaultLookAndFeel (&lookAndFeelV3); | |||||
| LookAndFeel::setDefaultLookAndFeel (&lookAndFeelV4); | |||||
| demoList.setModel (this); | demoList.setModel (this); | ||||
| demoList.setColour (ListBox::backgroundColourId, Colour::greyLevel (0.2f)); | |||||
| updateDemoListColours(); | |||||
| demoList.selectRow (0); | demoList.selectRow (0); | ||||
| addAndMakeVisible (demoList); | |||||
| if (Desktop::getInstance().getMainMouseSource().isTouch()) | |||||
| demoList.getViewport()->setScrollOnDragEnabled (true); | |||||
| addAndMakeVisible (demoList); | |||||
| } | } | ||||
| void clearCurrentDemo() | void clearCurrentDemo() | ||||
| @@ -129,7 +131,7 @@ public: | |||||
| void resized() override | void resized() override | ||||
| { | { | ||||
| Rectangle<int> r (getLocalBounds()); | |||||
| auto r = getLocalBounds(); | |||||
| if (r.getWidth() > 600) | if (r.getWidth() > 600) | ||||
| { | { | ||||
| @@ -156,9 +158,9 @@ public: | |||||
| if (rowIsSelected) | if (rowIsSelected) | ||||
| g.fillAll (Colours::deepskyblue); | g.fillAll (Colours::deepskyblue); | ||||
| if (JuceDemoTypeBase* type = JuceDemoTypeBase::getDemoTypeList() [rowNumber]) | |||||
| if (auto* type = JuceDemoTypeBase::getDemoTypeList() [rowNumber]) | |||||
| { | { | ||||
| String name (type->name.trimCharactersAtStart ("0123456789").trimStart()); | |||||
| auto name = type->name.trimCharactersAtStart ("0123456789").trimStart(); | |||||
| AttributedString a; | AttributedString a; | ||||
| a.setJustification (Justification::centredLeft); | a.setJustification (Justification::centredLeft); | ||||
| @@ -176,10 +178,13 @@ public: | |||||
| category << " "; | category << " "; | ||||
| } | } | ||||
| auto categoryColour = demoList.findColour (ListBox::outlineColourId); | |||||
| auto nameColour = demoList.findColour (ListBox::textColourId); | |||||
| if (category.isNotEmpty()) | if (category.isNotEmpty()) | ||||
| a.append (category, Font (10.0f), Colour::greyLevel (0.5f)); | |||||
| a.append (category, Font (10.0f), categoryColour); | |||||
| a.append (name, Font (13.0f), Colours::white.withAlpha (0.9f)); | |||||
| a.append (name, Font (13.0f), nameColour); | |||||
| a.draw (g, Rectangle<int> (width + 10, height).reduced (6, 0).toFloat()); | a.draw (g, Rectangle<int> (width + 10, height).reduced (6, 0).toFloat()); | ||||
| } | } | ||||
| @@ -187,7 +192,7 @@ public: | |||||
| void selectedRowsChanged (int lastRowSelected) override | void selectedRowsChanged (int lastRowSelected) override | ||||
| { | { | ||||
| if (JuceDemoTypeBase* selectedDemoType = JuceDemoTypeBase::getDemoTypeList() [lastRowSelected]) | |||||
| if (auto* selectedDemoType = JuceDemoTypeBase::getDemoTypeList() [lastRowSelected]) | |||||
| { | { | ||||
| currentDemo = nullptr; | currentDemo = nullptr; | ||||
| addAndMakeVisible (currentDemo = selectedDemoType->createComponent()); | addAndMakeVisible (currentDemo = selectedDemoType->createComponent()); | ||||
| @@ -206,7 +211,7 @@ public: | |||||
| if (currentDemo == nullptr) | if (currentDemo == nullptr) | ||||
| return -1; | return -1; | ||||
| Array<JuceDemoTypeBase*>& demos (JuceDemoTypeBase::getDemoTypeList()); | |||||
| auto& demos = JuceDemoTypeBase::getDemoTypeList(); | |||||
| for (int i = demos.size(); --i >= 0;) | for (int i = demos.size(); --i >= 0;) | ||||
| if (demos.getUnchecked (i)->name == currentDemo->getName()) | if (demos.getUnchecked (i)->name == currentDemo->getName()) | ||||
| @@ -217,10 +222,8 @@ public: | |||||
| void moveDemoPages (int numPagesToMove) | void moveDemoPages (int numPagesToMove) | ||||
| { | { | ||||
| const int newIndex = negativeAwareModulo (getCurrentPageIndex() + numPagesToMove, | |||||
| JuceDemoTypeBase::getDemoTypeList().size()); | |||||
| demoList.selectRow (newIndex); | |||||
| // we have to go through our demo list here or it won't be updated to reflect the current demo | |||||
| demoList.selectRow (negativeAwareModulo (getCurrentPageIndex() + numPagesToMove, | |||||
| JuceDemoTypeBase::getDemoTypeList().size())); | |||||
| } | } | ||||
| bool isShowingOpenGLDemo() const | bool isShowingOpenGLDemo() const | ||||
| @@ -242,6 +245,7 @@ private: | |||||
| LookAndFeel_V1 lookAndFeelV1; | LookAndFeel_V1 lookAndFeelV1; | ||||
| LookAndFeel_V2 lookAndFeelV2; | LookAndFeel_V2 lookAndFeelV2; | ||||
| LookAndFeel_V3 lookAndFeelV3; | LookAndFeel_V3 lookAndFeelV3; | ||||
| LookAndFeel_V4 lookAndFeelV4; | |||||
| //============================================================================== | //============================================================================== | ||||
| // The following methods implement the ApplicationCommandTarget interface, allowing | // The following methods implement the ApplicationCommandTarget interface, allowing | ||||
| @@ -272,6 +276,10 @@ private: | |||||
| MainAppWindow::useLookAndFeelV1, | MainAppWindow::useLookAndFeelV1, | ||||
| MainAppWindow::useLookAndFeelV2, | MainAppWindow::useLookAndFeelV2, | ||||
| MainAppWindow::useLookAndFeelV3, | MainAppWindow::useLookAndFeelV3, | ||||
| MainAppWindow::useLookAndFeelV4Dark, | |||||
| MainAppWindow::useLookAndFeelV4Midnight, | |||||
| MainAppWindow::useLookAndFeelV4Grey, | |||||
| MainAppWindow::useLookAndFeelV4Light, | |||||
| MainAppWindow::toggleRepaintDebugging, | MainAppWindow::toggleRepaintDebugging, | ||||
| #if ! JUCE_LINUX | #if ! JUCE_LINUX | ||||
| MainAppWindow::goToKioskMode, | MainAppWindow::goToKioskMode, | ||||
| @@ -285,7 +293,7 @@ private: | |||||
| MainAppWindow::renderingEngineTwo, | MainAppWindow::renderingEngineTwo, | ||||
| MainAppWindow::renderingEngineThree }; | MainAppWindow::renderingEngineThree }; | ||||
| StringArray renderingEngines (MainAppWindow::getMainAppWindow()->getRenderingEngines()); | |||||
| auto renderingEngines = MainAppWindow::getMainAppWindow()->getRenderingEngines(); | |||||
| commands.addArray (engineIDs, renderingEngines.size()); | commands.addArray (engineIDs, renderingEngines.size()); | ||||
| } | } | ||||
| @@ -355,8 +363,8 @@ private: | |||||
| case MainAppWindow::renderingEngineTwo: | case MainAppWindow::renderingEngineTwo: | ||||
| case MainAppWindow::renderingEngineThree: | case MainAppWindow::renderingEngineThree: | ||||
| { | { | ||||
| MainAppWindow& mainWindow = *MainAppWindow::getMainAppWindow(); | |||||
| const StringArray engines (mainWindow.getRenderingEngines()); | |||||
| auto& mainWindow = *MainAppWindow::getMainAppWindow(); | |||||
| auto engines = mainWindow.getRenderingEngines(); | |||||
| const int index = commandID - MainAppWindow::renderingEngineOne; | const int index = commandID - MainAppWindow::renderingEngineOne; | ||||
| result.setInfo ("Use " + engines[index], "Uses the " + engines[index] + " engine to render the UI", generalCategory, 0); | result.setInfo ("Use " + engines[index], "Uses the " + engines[index] + " engine to render the UI", generalCategory, 0); | ||||
| @@ -384,6 +392,27 @@ private: | |||||
| result.setTicked (isLookAndFeelSelected<LookAndFeel_V3>()); | result.setTicked (isLookAndFeelSelected<LookAndFeel_V3>()); | ||||
| break; | break; | ||||
| case MainAppWindow::useLookAndFeelV4Dark: | |||||
| result.setInfo ("Use LookAndFeel_V4 Dark", String(), generalCategory, 0); | |||||
| result.addDefaultKeypress ('k', ModifierKeys::commandModifier); | |||||
| result.setTicked (isColourSchemeActive (LookAndFeel_V4::getDarkColourScheme())); | |||||
| break; | |||||
| case MainAppWindow::useLookAndFeelV4Midnight: | |||||
| result.setInfo ("Use LookAndFeel_V4 Midnight", String(), generalCategory, 0); | |||||
| result.setTicked (isColourSchemeActive (LookAndFeel_V4::getMidnightColourScheme())); | |||||
| break; | |||||
| case MainAppWindow::useLookAndFeelV4Grey: | |||||
| result.setInfo ("Use LookAndFeel_V4 Grey", String(), generalCategory, 0); | |||||
| result.setTicked (isColourSchemeActive (LookAndFeel_V4::getGreyColourScheme())); | |||||
| break; | |||||
| case MainAppWindow::useLookAndFeelV4Light: | |||||
| result.setInfo ("Use LookAndFeel_V4 Light", String(), generalCategory, 0); | |||||
| result.setTicked (isColourSchemeActive (LookAndFeel_V4::getLightColourScheme())); | |||||
| break; | |||||
| case MainAppWindow::toggleRepaintDebugging: | case MainAppWindow::toggleRepaintDebugging: | ||||
| result.setInfo ("Toggle repaint display", String(), generalCategory, 0); | result.setInfo ("Toggle repaint display", String(), generalCategory, 0); | ||||
| result.addDefaultKeypress ('r', ModifierKeys()); | result.addDefaultKeypress ('r', ModifierKeys()); | ||||
| @@ -396,8 +425,8 @@ private: | |||||
| result.addDefaultKeypress ('n', ModifierKeys::commandModifier); | result.addDefaultKeypress ('n', ModifierKeys::commandModifier); | ||||
| bool nativeTitlebar = false; | bool nativeTitlebar = false; | ||||
| if (MainAppWindow* map = MainAppWindow::getMainAppWindow()) | |||||
| nativeTitlebar = map->isUsingNativeTitleBar(); | |||||
| if (auto* mainWindow = MainAppWindow::getMainAppWindow()) | |||||
| nativeTitlebar = mainWindow->isUsingNativeTitleBar(); | |||||
| result.setTicked (nativeTitlebar); | result.setTicked (nativeTitlebar); | ||||
| break; | break; | ||||
| @@ -418,63 +447,90 @@ private: | |||||
| bool perform (const InvocationInfo& info) override | bool perform (const InvocationInfo& info) override | ||||
| { | { | ||||
| MainAppWindow* mainWindow = MainAppWindow::getMainAppWindow(); | |||||
| if (mainWindow == nullptr) | |||||
| return true; | |||||
| switch (info.commandID) | |||||
| if (auto* mainWindow = MainAppWindow::getMainAppWindow()) | |||||
| { | { | ||||
| case MainAppWindow::showPreviousDemo: moveDemoPages (-1); break; | |||||
| case MainAppWindow::showNextDemo: moveDemoPages ( 1); break; | |||||
| case MainAppWindow::welcome: | |||||
| case MainAppWindow::componentsAnimation: | |||||
| case MainAppWindow::componentsDialogBoxes: | |||||
| case MainAppWindow::componentsKeyMappings: | |||||
| case MainAppWindow::componentsMDI: | |||||
| case MainAppWindow::componentsPropertyEditors: | |||||
| case MainAppWindow::componentsTransforms: | |||||
| case MainAppWindow::componentsWebBrowsers: | |||||
| case MainAppWindow::componentsWidgets: | |||||
| demoList.selectRow (info.commandID - MainAppWindow::welcome); | |||||
| break; | |||||
| switch (info.commandID) | |||||
| { | |||||
| case MainAppWindow::showPreviousDemo: moveDemoPages (-1); break; | |||||
| case MainAppWindow::showNextDemo: moveDemoPages ( 1); break; | |||||
| case MainAppWindow::welcome: | |||||
| case MainAppWindow::componentsAnimation: | |||||
| case MainAppWindow::componentsDialogBoxes: | |||||
| case MainAppWindow::componentsKeyMappings: | |||||
| case MainAppWindow::componentsMDI: | |||||
| case MainAppWindow::componentsPropertyEditors: | |||||
| case MainAppWindow::componentsTransforms: | |||||
| case MainAppWindow::componentsWebBrowsers: | |||||
| case MainAppWindow::componentsWidgets: | |||||
| demoList.selectRow (info.commandID - MainAppWindow::welcome); | |||||
| break; | |||||
| case MainAppWindow::renderingEngineOne: | |||||
| case MainAppWindow::renderingEngineTwo: | |||||
| case MainAppWindow::renderingEngineThree: | |||||
| mainWindow->setRenderingEngine (info.commandID - MainAppWindow::renderingEngineOne); | |||||
| break; | |||||
| case MainAppWindow::renderingEngineOne: | |||||
| case MainAppWindow::renderingEngineTwo: | |||||
| case MainAppWindow::renderingEngineThree: | |||||
| mainWindow->setRenderingEngine (info.commandID - MainAppWindow::renderingEngineOne); | |||||
| break; | |||||
| case MainAppWindow::useLookAndFeelV1: LookAndFeel::setDefaultLookAndFeel (&lookAndFeelV1); break; | |||||
| case MainAppWindow::useLookAndFeelV2: LookAndFeel::setDefaultLookAndFeel (&lookAndFeelV2); break; | |||||
| case MainAppWindow::useLookAndFeelV3: LookAndFeel::setDefaultLookAndFeel (&lookAndFeelV3); break; | |||||
| case MainAppWindow::useLookAndFeelV1: | |||||
| LookAndFeel::setDefaultLookAndFeel (&lookAndFeelV1); | |||||
| updateDemoListColours(); | |||||
| break; | |||||
| case MainAppWindow::useLookAndFeelV2: | |||||
| LookAndFeel::setDefaultLookAndFeel (&lookAndFeelV2); | |||||
| updateDemoListColours(); | |||||
| break; | |||||
| case MainAppWindow::useLookAndFeelV3: | |||||
| LookAndFeel::setDefaultLookAndFeel (&lookAndFeelV3); | |||||
| updateDemoListColours(); | |||||
| break; | |||||
| case MainAppWindow::useLookAndFeelV4Dark: | |||||
| lookAndFeelV4.setColourScheme (LookAndFeel_V4::getDarkColourScheme()); | |||||
| LookAndFeel::setDefaultLookAndFeel (&lookAndFeelV4); | |||||
| updateDemoListColours(); | |||||
| break; | |||||
| case MainAppWindow::useLookAndFeelV4Midnight: | |||||
| lookAndFeelV4.setColourScheme (LookAndFeel_V4::getMidnightColourScheme()); | |||||
| LookAndFeel::setDefaultLookAndFeel (&lookAndFeelV4); | |||||
| updateDemoListColours(); | |||||
| break; | |||||
| case MainAppWindow::useLookAndFeelV4Grey: | |||||
| lookAndFeelV4.setColourScheme (LookAndFeel_V4::getGreyColourScheme()); | |||||
| LookAndFeel::setDefaultLookAndFeel (&lookAndFeelV4); | |||||
| updateDemoListColours(); | |||||
| break; | |||||
| case MainAppWindow::useLookAndFeelV4Light: | |||||
| lookAndFeelV4.setColourScheme (LookAndFeel_V4::getLightColourScheme()); | |||||
| LookAndFeel::setDefaultLookAndFeel (&lookAndFeelV4); | |||||
| updateDemoListColours(); | |||||
| break; | |||||
| case MainAppWindow::toggleRepaintDebugging: | |||||
| juceDemoRepaintDebuggingActive = ! juceDemoRepaintDebuggingActive; | |||||
| mainWindow->repaint(); | |||||
| break; | |||||
| case MainAppWindow::toggleRepaintDebugging: | |||||
| juceDemoRepaintDebuggingActive = ! juceDemoRepaintDebuggingActive; | |||||
| mainWindow->repaint(); | |||||
| break; | |||||
| case MainAppWindow::useNativeTitleBar: | |||||
| mainWindow->setUsingNativeTitleBar (! mainWindow->isUsingNativeTitleBar()); | |||||
| break; | |||||
| case MainAppWindow::useNativeTitleBar: | |||||
| mainWindow->setUsingNativeTitleBar (! mainWindow->isUsingNativeTitleBar()); | |||||
| break; | |||||
| #if ! JUCE_LINUX | |||||
| case MainAppWindow::goToKioskMode: | |||||
| { | |||||
| Desktop& desktop = Desktop::getInstance(); | |||||
| #if ! JUCE_LINUX | |||||
| case MainAppWindow::goToKioskMode: | |||||
| { | |||||
| auto& desktop = Desktop::getInstance(); | |||||
| if (desktop.getKioskModeComponent() == nullptr) | |||||
| desktop.setKioskModeComponent (getTopLevelComponent()); | |||||
| else | |||||
| desktop.setKioskModeComponent (nullptr); | |||||
| if (desktop.getKioskModeComponent() == nullptr) | |||||
| desktop.setKioskModeComponent (getTopLevelComponent()); | |||||
| else | |||||
| desktop.setKioskModeComponent (nullptr); | |||||
| break; | |||||
| } | |||||
| #endif | |||||
| break; | |||||
| } | |||||
| #endif | |||||
| default: | |||||
| return false; | |||||
| default: | |||||
| return false; | |||||
| } | |||||
| } | } | ||||
| return true; | return true; | ||||
| @@ -486,6 +542,28 @@ private: | |||||
| LookAndFeel& lf = getLookAndFeel(); | LookAndFeel& lf = getLookAndFeel(); | ||||
| return typeid (LookAndFeelType) == typeid (lf); | return typeid (LookAndFeelType) == typeid (lf); | ||||
| } | } | ||||
| bool isColourSchemeActive (LookAndFeel_V4::ColourScheme scheme) | |||||
| { | |||||
| if (auto* v4 = dynamic_cast<LookAndFeel_V4*> (&LookAndFeel::getDefaultLookAndFeel())) | |||||
| if (v4->getCurrentColourScheme() == scheme) | |||||
| return true; | |||||
| return false; | |||||
| } | |||||
| void updateDemoListColours() | |||||
| { | |||||
| demoList.setColour (ListBox::backgroundColourId, | |||||
| getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::widgetBackground, Colour::greyLevel (0.2f))); | |||||
| demoList.setColour (ListBox::textColourId, | |||||
| getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::defaultText, | |||||
| Colours::white.withAlpha (0.9f))); | |||||
| demoList.setColour (ListBox::outlineColourId, | |||||
| getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour::defaultText, | |||||
| Colour::greyLevel (0.5f)).interpolatedWith (Colours::red, 0.4f)); | |||||
| } | |||||
| }; | }; | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -494,7 +572,7 @@ static ScopedPointer<AudioDeviceManager> sharedAudioDeviceManager; | |||||
| MainAppWindow::MainAppWindow() | MainAppWindow::MainAppWindow() | ||||
| : DocumentWindow (JUCEApplication::getInstance()->getApplicationName(), | : DocumentWindow (JUCEApplication::getInstance()->getApplicationName(), | ||||
| Colours::lightgrey, | |||||
| LookAndFeel::getDefaultLookAndFeel().findColour (ResizableWindow::backgroundColourId), | |||||
| DocumentWindow::allButtons) | DocumentWindow::allButtons) | ||||
| { | { | ||||
| setUsingNativeTitleBar (true); | setUsingNativeTitleBar (true); | ||||
| @@ -574,7 +652,7 @@ void MainAppWindow::runtimePermissionsCallback (bool wasGranted) | |||||
| MainAppWindow* MainAppWindow::getMainAppWindow() | MainAppWindow* MainAppWindow::getMainAppWindow() | ||||
| { | { | ||||
| for (int i = TopLevelWindow::getNumTopLevelWindows(); --i >= 0;) | for (int i = TopLevelWindow::getNumTopLevelWindows(); --i >= 0;) | ||||
| if (MainAppWindow* maw = dynamic_cast<MainAppWindow*> (TopLevelWindow::getTopLevelWindow (i))) | |||||
| if (auto* maw = dynamic_cast<MainAppWindow*> (TopLevelWindow::getTopLevelWindow (i))) | |||||
| return maw; | return maw; | ||||
| return nullptr; | return nullptr; | ||||
| @@ -584,7 +662,8 @@ void MainAppWindow::handleAsyncUpdate() | |||||
| { | { | ||||
| // This registers all of our commands with the command manager but has to be done after the window has | // This registers all of our commands with the command manager but has to be done after the window has | ||||
| // been created so we can find the number of rendering engines available | // been created so we can find the number of rendering engines available | ||||
| ApplicationCommandManager& commandManager = MainAppWindow::getApplicationCommandManager(); | |||||
| auto& commandManager = MainAppWindow::getApplicationCommandManager(); | |||||
| commandManager.registerAllCommandsForTarget (contentComponent); | commandManager.registerAllCommandsForTarget (contentComponent); | ||||
| commandManager.registerAllCommandsForTarget (JUCEApplication::getInstance()); | commandManager.registerAllCommandsForTarget (JUCEApplication::getInstance()); | ||||
| } | } | ||||
| @@ -597,7 +676,7 @@ void MainAppWindow::showMessageBubble (const String& text) | |||||
| AttributedString attString; | AttributedString attString; | ||||
| attString.append (text, Font (15.0f)); | attString.append (text, Font (15.0f)); | ||||
| currentBubbleMessage->showAt (Rectangle<int> (getLocalBounds().getCentreX(), 10, 1, 1), | |||||
| currentBubbleMessage->showAt ({ getLocalBounds().getCentreX(), 10, 1, 1 }, | |||||
| attString, | attString, | ||||
| 500, // numMillisecondsBeforeRemoving | 500, // numMillisecondsBeforeRemoving | ||||
| true, // removeWhenMouseClicked | true, // removeWhenMouseClicked | ||||
| @@ -610,7 +689,7 @@ StringArray MainAppWindow::getRenderingEngines() const | |||||
| { | { | ||||
| StringArray renderingEngines; | StringArray renderingEngines; | ||||
| if (ComponentPeer* peer = getPeer()) | |||||
| if (auto* peer = getPeer()) | |||||
| renderingEngines = peer->getAvailableRenderingEngines(); | renderingEngines = peer->getAvailableRenderingEngines(); | ||||
| #if JUCE_OPENGL | #if JUCE_OPENGL | ||||
| @@ -636,7 +715,7 @@ void MainAppWindow::setRenderingEngine (int index) | |||||
| openGLContext.detach(); | openGLContext.detach(); | ||||
| #endif | #endif | ||||
| if (ComponentPeer* peer = getPeer()) | |||||
| if (auto* peer = getPeer()) | |||||
| peer->setCurrentRenderingEngine (index); | peer->setCurrentRenderingEngine (index); | ||||
| } | } | ||||
| @@ -652,7 +731,7 @@ int MainAppWindow::getActiveRenderingEngine() const | |||||
| return getRenderingEngines().indexOf (openGLRendererName); | return getRenderingEngines().indexOf (openGLRendererName); | ||||
| #endif | #endif | ||||
| if (ComponentPeer* peer = getPeer()) | |||||
| if (auto* peer = getPeer()) | |||||
| return peer->getCurrentRenderingEngine(); | return peer->getCurrentRenderingEngine(); | ||||
| return 0; | return 0; | ||||
| @@ -81,11 +81,15 @@ public: | |||||
| renderingEngineTwo = 0x2301, | renderingEngineTwo = 0x2301, | ||||
| renderingEngineThree = 0x2302, // these must be contiguous! | renderingEngineThree = 0x2302, // these must be contiguous! | ||||
| useLookAndFeelV1 = 0x200b, | |||||
| useLookAndFeelV2 = 0x200c, | |||||
| useLookAndFeelV3 = 0x200d, | |||||
| toggleRepaintDebugging = 0x200e, | |||||
| useLookAndFeelV1 = 0x300a, | |||||
| useLookAndFeelV2 = 0x300b, | |||||
| useLookAndFeelV3 = 0x300c, | |||||
| useLookAndFeelV4Dark = 0x300d, | |||||
| useLookAndFeelV4Midnight = 0x300e, | |||||
| useLookAndFeelV4Grey = 0x300f, | |||||
| useLookAndFeelV4Light = 0x3010, | |||||
| toggleRepaintDebugging = 0x201a, | |||||
| useNativeTitleBar = 0x201d, | useNativeTitleBar = 0x201d, | ||||
| goToKioskMode = 0x200f | goToKioskMode = 0x200f | ||||
| @@ -22,7 +22,7 @@ public: | |||||
| //============================================================================== | //============================================================================== | ||||
| HelloWorldWindow() | HelloWorldWindow() | ||||
| : DocumentWindow ("JUCE Hello World!", | : DocumentWindow ("JUCE Hello World!", | ||||
| Colours::lightgrey, | |||||
| LookAndFeel::getDefaultLookAndFeel().findColour (ResizableWindow::backgroundColourId), | |||||
| DocumentWindow::allButtons, | DocumentWindow::allButtons, | ||||
| true) | true) | ||||
| { | { | ||||
| @@ -70,7 +70,10 @@ public: | |||||
| { | { | ||||
| public: | public: | ||||
| MainWindow (String name) | MainWindow (String name) | ||||
| : DocumentWindow (name, Colours::lightgrey, DocumentWindow::allButtons) | |||||
| : DocumentWindow (name, | |||||
| LookAndFeel::getDefaultLookAndFeel() | |||||
| .findColour (ResizableWindow::backgroundColourId), | |||||
| DocumentWindow::allButtons) | |||||
| { | { | ||||
| setUsingNativeTitleBar (true); | setUsingNativeTitleBar (true); | ||||
| setContentOwned (new MPETestClasses::MainComponent(), true); | setContentOwned (new MPETestClasses::MainComponent(), true); | ||||
| @@ -38,7 +38,6 @@ public: | |||||
| zoneLayoutComp (colourPicker), | zoneLayoutComp (colourPicker), | ||||
| visualiserComp (colourPicker) | visualiserComp (colourPicker) | ||||
| { | { | ||||
| setLookAndFeel (&lookAndFeel); | |||||
| setSize (880, 720); | setSize (880, 720); | ||||
| audioDeviceManager.initialise (0, 2, 0, true, String(), 0); | audioDeviceManager.initialise (0, 2, 0, true, String(), 0); | ||||
| audioDeviceManager.addMidiInputCallback (String(), this); | audioDeviceManager.addMidiInputCallback (String(), this); | ||||
| @@ -175,7 +174,6 @@ private: | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| LookAndFeel_V3 lookAndFeel; | |||||
| AudioDeviceManager audioDeviceManager; | AudioDeviceManager audioDeviceManager; | ||||
| MPEZoneLayout zoneLayout; | MPEZoneLayout zoneLayout; | ||||
| @@ -76,7 +76,8 @@ public: | |||||
| { | { | ||||
| public: | public: | ||||
| MainWindow (String name) : DocumentWindow (name, | MainWindow (String name) : DocumentWindow (name, | ||||
| Colours::lightgrey, | |||||
| LookAndFeel::getDefaultLookAndFeel() | |||||
| .findColour (ResizableWindow::backgroundColourId), | |||||
| DocumentWindow::allButtons) | DocumentWindow::allButtons) | ||||
| { | { | ||||
| setUsingNativeTitleBar (true); | setUsingNativeTitleBar (true); | ||||
| @@ -72,13 +72,13 @@ public: | |||||
| void paintListBoxItem (int rowNumber, Graphics &g, | void paintListBoxItem (int rowNumber, Graphics &g, | ||||
| int width, int height, bool rowIsSelected) override | int width, int height, bool rowIsSelected) override | ||||
| { | { | ||||
| const auto textColour = getLookAndFeel().findColour (ListBox::textColourId); | |||||
| if (rowIsSelected) | if (rowIsSelected) | ||||
| g.fillAll (Colours::lightblue); | |||||
| else if (rowNumber % 2) | |||||
| g.fillAll (Colour (0xffeeeeee)); | |||||
| g.fillAll (textColour.interpolatedWith (getLookAndFeel().findColour (ListBox::backgroundColourId), 0.5)); | |||||
| g.setColour (Colours::black); | |||||
| g.setColour (textColour); | |||||
| g.setFont (height * 0.7f); | g.setFont (height * 0.7f); | ||||
| if (isInput) | if (isInput) | ||||
| @@ -209,9 +209,8 @@ MainContentComponent::~MainContentComponent() | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| void MainContentComponent::paint (Graphics& g) | |||||
| void MainContentComponent::paint (Graphics&) | |||||
| { | { | ||||
| g.fillAll (Colours::white); | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -64,7 +64,8 @@ public: | |||||
| { | { | ||||
| public: | public: | ||||
| MainWindow (String name) : DocumentWindow (name, | MainWindow (String name) : DocumentWindow (name, | ||||
| Colours::lightgrey, | |||||
| LookAndFeel::getDefaultLookAndFeel() | |||||
| .findColour (ResizableWindow::backgroundColourId), | |||||
| DocumentWindow::allButtons) | DocumentWindow::allButtons) | ||||
| { | { | ||||
| setUsingNativeTitleBar (true); | setUsingNativeTitleBar (true); | ||||
| @@ -64,7 +64,8 @@ public: | |||||
| { | { | ||||
| public: | public: | ||||
| MainWindow (String name) : DocumentWindow (name, | MainWindow (String name) : DocumentWindow (name, | ||||
| Colours::lightgrey, | |||||
| LookAndFeel::getDefaultLookAndFeel() | |||||
| .findColour (ResizableWindow::backgroundColourId), | |||||
| DocumentWindow::allButtons) | DocumentWindow::allButtons) | ||||
| { | { | ||||
| setUsingNativeTitleBar (true); | setUsingNativeTitleBar (true); | ||||
| @@ -64,7 +64,8 @@ public: | |||||
| { | { | ||||
| public: | public: | ||||
| MainWindow (String name) : DocumentWindow (name, | MainWindow (String name) : DocumentWindow (name, | ||||
| Colours::lightgrey, | |||||
| LookAndFeel::getDefaultLookAndFeel() | |||||
| .findColour (ResizableWindow::backgroundColourId), | |||||
| DocumentWindow::allButtons) | DocumentWindow::allButtons) | ||||
| { | { | ||||
| setUsingNativeTitleBar (true); | setUsingNativeTitleBar (true); | ||||
| @@ -63,7 +63,8 @@ public: | |||||
| { | { | ||||
| public: | public: | ||||
| MainWindow (String name) : DocumentWindow (name, | MainWindow (String name) : DocumentWindow (name, | ||||
| Colours::lightgrey, | |||||
| LookAndFeel::getDefaultLookAndFeel() | |||||
| .findColour (ResizableWindow::backgroundColourId), | |||||
| DocumentWindow::allButtons) | DocumentWindow::allButtons) | ||||
| { | { | ||||
| setUsingNativeTitleBar (true); | setUsingNativeTitleBar (true); | ||||
| @@ -60,11 +60,10 @@ public: | |||||
| void render() override | void render() override | ||||
| { | { | ||||
| jassert (OpenGLHelpers::isContextActive()); | jassert (OpenGLHelpers::isContextActive()); | ||||
| const float desktopScale = (float) openGLContext.getRenderingScale(); | const float desktopScale = (float) openGLContext.getRenderingScale(); | ||||
| OpenGLHelpers::clear (Colour::greyLevel (0.1f)); | |||||
| OpenGLHelpers::clear (getLookAndFeel().findColour (ResizableWindow::backgroundColourId)); | |||||
| glEnable (GL_BLEND); | glEnable (GL_BLEND); | ||||
| glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); | glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); | ||||
| @@ -92,7 +91,7 @@ public: | |||||
| // You can add your component specific drawing code here! | // You can add your component specific drawing code here! | ||||
| // This will draw over the top of the openGL background. | // This will draw over the top of the openGL background. | ||||
| g.setColour(Colours::white); | |||||
| g.setColour (getLookAndFeel().findColour (Label::textColourId)); | |||||
| g.setFont (20); | g.setFont (20); | ||||
| g.drawText ("OpenGL Example", 25, 20, 300, 30, Justification::left); | g.drawText ("OpenGL Example", 25, 20, 300, 30, Justification::left); | ||||
| g.drawLine (20, 20, 170, 20); | g.drawLine (20, 20, 170, 20); | ||||
| @@ -52,7 +52,8 @@ public: | |||||
| { | { | ||||
| public: | public: | ||||
| MainWindow() : DocumentWindow (ProjectInfo::projectName, | MainWindow() : DocumentWindow (ProjectInfo::projectName, | ||||
| Colours::lightgrey, | |||||
| LookAndFeel::getDefaultLookAndFeel() | |||||
| .findColour (ResizableWindow::backgroundColourId), | |||||
| DocumentWindow::allButtons) | DocumentWindow::allButtons) | ||||
| { | { | ||||
| setUsingNativeTitleBar (true); | setUsingNativeTitleBar (true); | ||||
| @@ -64,7 +64,6 @@ public: | |||||
| //============================================================================== | //============================================================================== | ||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| g.fillAll (Colours::black); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| @@ -96,7 +96,7 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| g.fillAll (Colours::white); | |||||
| g.fillAll (getLookAndFeel().findColour (ResizableWindow::backgroundColourId)); | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -30,7 +30,6 @@ public: | |||||
| // Configure all the graphics for the transport control. | // Configure all the graphics for the transport control. | ||||
| transportText.setColour (Label::textColourId, Colours::white); | |||||
| transportText.setFont (Font (Font::getDefaultMonospacedFontName(), 18.0f, Font::plain)); | transportText.setFont (Font (Font::getDefaultMonospacedFontName(), 18.0f, Font::plain)); | ||||
| transportText.setJustificationType (Justification::topLeft); | transportText.setJustificationType (Justification::topLeft); | ||||
| addChildComponent (transportText); | addChildComponent (transportText); | ||||
| @@ -56,7 +55,6 @@ public: | |||||
| // Configure the switch to host button. | // Configure the switch to host button. | ||||
| switchToHostButtonLabel.setColour (Label::textColourId, Colours::white); | |||||
| switchToHostButtonLabel.setFont (Font (Font::getDefaultMonospacedFontName(), 18.0f, Font::plain)); | switchToHostButtonLabel.setFont (Font (Font::getDefaultMonospacedFontName(), 18.0f, Font::plain)); | ||||
| switchToHostButtonLabel.setJustificationType (Justification::centredRight); | switchToHostButtonLabel.setJustificationType (Justification::centredRight); | ||||
| switchToHostButtonLabel.setText ("Switch to\nhost app:", dontSendNotification); | switchToHostButtonLabel.setText ("Switch to\nhost app:", dontSendNotification); | ||||
| @@ -76,12 +74,12 @@ public: | |||||
| //============================================================================== | //============================================================================== | ||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| g.fillAll (Colours::darkgrey); | |||||
| g.fillAll (getLookAndFeel().findColour (ResizableWindow::backgroundColourId)); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| { | { | ||||
| auto area = getBounds().reduced (10); | |||||
| auto area = getBounds().reduced (20); | |||||
| gainSlider.setBounds (area.removeFromLeft (60)); | gainSlider.setBounds (area.removeFromLeft (60)); | ||||
| @@ -254,7 +252,7 @@ private: | |||||
| AudioProcessorValueTreeState& parameters; | AudioProcessorValueTreeState& parameters; | ||||
| const int buttonSize = 30; | const int buttonSize = 30; | ||||
| const Colour defaultButtonColour = Colours::lightgrey; | |||||
| const Colour defaultButtonColour = Colours::darkgrey; | |||||
| ShapeButton rewindButton {"Rewind", defaultButtonColour, defaultButtonColour, defaultButtonColour}; | ShapeButton rewindButton {"Rewind", defaultButtonColour, defaultButtonColour, defaultButtonColour}; | ||||
| ShapeButton playButton {"Play", defaultButtonColour, defaultButtonColour, defaultButtonColour}; | ShapeButton playButton {"Play", defaultButtonColour, defaultButtonColour, defaultButtonColour}; | ||||
| ShapeButton recordButton {"Record", defaultButtonColour, defaultButtonColour, defaultButtonColour}; | ShapeButton recordButton {"Record", defaultButtonColour, defaultButtonColour, defaultButtonColour}; | ||||
| @@ -16,17 +16,17 @@ public: | |||||
| //============================================================================== | //============================================================================== | ||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| g.fillAll(Colours::transparentBlack); | |||||
| g.fillAll (Colours::transparentBlack); | |||||
| auto area = g.getClipBounds(); | auto area = g.getClipBounds(); | ||||
| g.setColour (Colours::skyblue); | |||||
| g.fillRoundedRectangle(area.toFloat(), 6.0); | |||||
| g.setColour (getLookAndFeel().findColour (Slider::thumbColourId)); | |||||
| g.fillRoundedRectangle (area.toFloat(), 6.0); | |||||
| auto unfilledHeight = area.getHeight() * (1.0 - level); | auto unfilledHeight = area.getHeight() * (1.0 - level); | ||||
| g.reduceClipRegion (area.getX(), area.getY(), | g.reduceClipRegion (area.getX(), area.getY(), | ||||
| area.getWidth(), (int) unfilledHeight); | area.getWidth(), (int) unfilledHeight); | ||||
| g.setColour (Colours::grey); | |||||
| g.fillRoundedRectangle(area.toFloat(), 6.0); | |||||
| g.setColour (getLookAndFeel().findColour (Slider::trackColourId)); | |||||
| g.fillRoundedRectangle (area.toFloat(), 6.0); | |||||
| } | } | ||||
| void resized() override {} | void resized() override {} | ||||
| @@ -74,7 +74,7 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| g.fillAll (Colours::white); | |||||
| g.fillAll (getLookAndFeel().findColour (ResizableWindow::backgroundColourId)); | |||||
| } | } | ||||
| void buttonClicked (Button* btn) override | void buttonClicked (Button* btn) override | ||||
| @@ -127,11 +127,14 @@ public: | |||||
| if (ChannelClickListener* listener = dynamic_cast<ChannelClickListener*> (getAudioProcessor())) | 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) | for (int i = 0; i < activeChannels.size(); ++i) | ||||
| { | { | ||||
| bool isActive = listener->isChannelActive (i); | bool isActive = listener->isChannelActive (i); | ||||
| 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(); | channelButtons [i]->repaint(); | ||||
| } | } | ||||
| } | } | ||||
| @@ -159,13 +162,16 @@ private: | |||||
| { | { | ||||
| if (ChannelClickListener* listener = dynamic_cast<ChannelClickListener*> (getAudioProcessor())) | 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) | for (int i = 0; i < activeChannels.size(); ++i) | ||||
| { | { | ||||
| bool isActive = listener->isChannelActive (i); | bool isActive = listener->isChannelActive (i); | ||||
| if (activeChannels.getReference (i) != isActive) | if (activeChannels.getReference (i) != isActive) | ||||
| { | { | ||||
| 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(); | channelButtons [i]->repaint(); | ||||
| } | } | ||||
| } | } | ||||
| @@ -49,7 +49,8 @@ public: | |||||
| { | { | ||||
| public: | public: | ||||
| MainWindow() : DocumentWindow (ProjectInfo::projectName, | MainWindow() : DocumentWindow (ProjectInfo::projectName, | ||||
| Colours::lightgrey, | |||||
| LookAndFeel::getDefaultLookAndFeel() | |||||
| .findColour (ResizableWindow::backgroundColourId), | |||||
| DocumentWindow::allButtons) | DocumentWindow::allButtons) | ||||
| { | { | ||||
| setUsingNativeTitleBar (true); | setUsingNativeTitleBar (true); | ||||
| @@ -82,7 +82,6 @@ JuceDemoPluginAudioProcessorEditor::JuceDemoPluginAudioProcessorEditor (JuceDemo | |||||
| // add a label that will display the current timecode and status.. | // add a label that will display the current timecode and status.. | ||||
| addAndMakeVisible (timecodeDisplayLabel); | addAndMakeVisible (timecodeDisplayLabel); | ||||
| timecodeDisplayLabel.setColour (Label::textColourId, Colours::blue); | |||||
| timecodeDisplayLabel.setFont (Font (Font::getDefaultMonospacedFontName(), 15.0f, Font::plain)); | timecodeDisplayLabel.setFont (Font (Font::getDefaultMonospacedFontName(), 15.0f, Font::plain)); | ||||
| // set resize limits for this plug-in | // set resize limits for this plug-in | ||||
| @@ -103,8 +102,7 @@ JuceDemoPluginAudioProcessorEditor::~JuceDemoPluginAudioProcessorEditor() | |||||
| //============================================================================== | //============================================================================== | ||||
| void JuceDemoPluginAudioProcessorEditor::paint (Graphics& g) | void JuceDemoPluginAudioProcessorEditor::paint (Graphics& g) | ||||
| { | { | ||||
| g.setGradientFill (ColourGradient (Colours::white, 0, 0, | |||||
| Colours::lightgrey, 0, (float) getHeight(), false)); | |||||
| g.setColour (getLookAndFeel().findColour (ResizableWindow::backgroundColourId)); | |||||
| g.fillAll(); | g.fillAll(); | ||||
| } | } | ||||
| @@ -117,8 +115,8 @@ void JuceDemoPluginAudioProcessorEditor::resized() | |||||
| timecodeDisplayLabel.setBounds (r.removeFromTop (26)); | timecodeDisplayLabel.setBounds (r.removeFromTop (26)); | ||||
| midiKeyboard.setBounds (r.removeFromBottom (70)); | midiKeyboard.setBounds (r.removeFromBottom (70)); | ||||
| r.removeFromTop (30); | |||||
| Rectangle<int> sliderArea (r.removeFromTop (50)); | |||||
| r.removeFromTop (20); | |||||
| Rectangle<int> sliderArea (r.removeFromTop (60)); | |||||
| gainSlider->setBounds (sliderArea.removeFromLeft (jmin (180, sliderArea.getWidth() / 2))); | gainSlider->setBounds (sliderArea.removeFromLeft (jmin (180, sliderArea.getWidth() / 2))); | ||||
| delaySlider->setBounds (sliderArea.removeFromLeft (jmin (180, sliderArea.getWidth()))); | delaySlider->setBounds (sliderArea.removeFromLeft (jmin (180, sliderArea.getWidth()))); | ||||
| @@ -36,7 +36,8 @@ static Array <PluginWindow*> activePluginWindows; | |||||
| PluginWindow::PluginWindow (Component* const pluginEditor, | PluginWindow::PluginWindow (Component* const pluginEditor, | ||||
| AudioProcessorGraph::Node* const o, | AudioProcessorGraph::Node* const o, | ||||
| WindowFormatType t) | WindowFormatType t) | ||||
| : DocumentWindow (pluginEditor->getName(), Colours::lightblue, | |||||
| : DocumentWindow (pluginEditor->getName(), | |||||
| LookAndFeel::getDefaultLookAndFeel().findColour (ResizableWindow::backgroundColourId), | |||||
| DocumentWindow::minimiseButton | DocumentWindow::closeButton), | DocumentWindow::minimiseButton | DocumentWindow::closeButton), | ||||
| owner (o), | owner (o), | ||||
| type (t) | type (t) | ||||
| @@ -440,7 +441,7 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| g.setColour (Colours::lightgrey); | |||||
| g.setColour (findColour (TextEditor::backgroundColourId)); | |||||
| const int x = 4; | const int x = 4; | ||||
| const int y = pinSize; | const int y = pinSize; | ||||
| @@ -449,12 +450,9 @@ public: | |||||
| g.fillRect (x, y, w, h); | g.fillRect (x, y, w, h); | ||||
| g.setColour (Colours::black); | |||||
| g.setColour (findColour (TextEditor::textColourId)); | |||||
| g.setFont (font); | g.setFont (font); | ||||
| g.drawFittedText (getName(), getLocalBounds().reduced (4, 2), Justification::centred, 2); | g.drawFittedText (getName(), getLocalBounds().reduced (4, 2), Justification::centred, 2); | ||||
| g.setColour (Colours::grey); | |||||
| g.drawRect (x, y, w, h); | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| @@ -839,7 +837,7 @@ GraphEditorPanel::~GraphEditorPanel() | |||||
| void GraphEditorPanel::paint (Graphics& g) | void GraphEditorPanel::paint (Graphics& g) | ||||
| { | { | ||||
| g.fillAll (Colours::white); | |||||
| g.fillAll (getLookAndFeel().findColour (ResizableWindow::backgroundColourId)); | |||||
| } | } | ||||
| void GraphEditorPanel::mouseDown (const MouseEvent& e) | void GraphEditorPanel::mouseDown (const MouseEvent& e) | ||||
| @@ -50,8 +50,6 @@ public: | |||||
| appProperties = new ApplicationProperties(); | appProperties = new ApplicationProperties(); | ||||
| appProperties->setStorageParameters (options); | appProperties->setStorageParameters (options); | ||||
| LookAndFeel::setDefaultLookAndFeel (&lookAndFeel); | |||||
| mainWindow = new MainHostWindow(); | mainWindow = new MainHostWindow(); | ||||
| mainWindow->setUsingNativeTitleBar (true); | mainWindow->setUsingNativeTitleBar (true); | ||||
| @@ -119,7 +117,6 @@ public: | |||||
| ApplicationCommandManager commandManager; | ApplicationCommandManager commandManager; | ||||
| ScopedPointer<ApplicationProperties> appProperties; | ScopedPointer<ApplicationProperties> appProperties; | ||||
| LookAndFeel_V3 lookAndFeel; | |||||
| private: | private: | ||||
| ScopedPointer<MainHostWindow> mainWindow; | ScopedPointer<MainHostWindow> mainWindow; | ||||
| @@ -32,7 +32,8 @@ class MainHostWindow::PluginListWindow : public DocumentWindow | |||||
| { | { | ||||
| public: | public: | ||||
| PluginListWindow (MainHostWindow& owner_, AudioPluginFormatManager& pluginFormatManager) | PluginListWindow (MainHostWindow& owner_, AudioPluginFormatManager& pluginFormatManager) | ||||
| : DocumentWindow ("Available Plugins", Colours::white, | |||||
| : DocumentWindow ("Available Plugins", | |||||
| LookAndFeel::getDefaultLookAndFeel().findColour (ResizableWindow::backgroundColourId), | |||||
| DocumentWindow::minimiseButton | DocumentWindow::closeButton), | DocumentWindow::minimiseButton | DocumentWindow::closeButton), | ||||
| owner (owner_) | owner (owner_) | ||||
| { | { | ||||
| @@ -72,7 +73,8 @@ private: | |||||
| //============================================================================== | //============================================================================== | ||||
| MainHostWindow::MainHostWindow() | MainHostWindow::MainHostWindow() | ||||
| : DocumentWindow (JUCEApplication::getInstance()->getApplicationName(), Colours::lightgrey, | |||||
| : DocumentWindow (JUCEApplication::getInstance()->getApplicationName(), | |||||
| LookAndFeel::getDefaultLookAndFeel().findColour (ResizableWindow::backgroundColourId), | |||||
| DocumentWindow::allButtons) | DocumentWindow::allButtons) | ||||
| { | { | ||||
| formatManager.addDefaultFormats(); | formatManager.addDefaultFormats(); | ||||
| @@ -502,7 +504,7 @@ void MainHostWindow::showAudioSettings() | |||||
| o.content.setNonOwned (&audioSettingsComp); | o.content.setNonOwned (&audioSettingsComp); | ||||
| o.dialogTitle = "Audio Settings"; | o.dialogTitle = "Audio Settings"; | ||||
| o.componentToCentreAround = this; | o.componentToCentreAround = this; | ||||
| o.dialogBackgroundColour = Colours::azure; | |||||
| o.dialogBackgroundColour = getLookAndFeel().findColour (ResizableWindow::backgroundColourId); | |||||
| o.escapeKeyTriggersCloseButton = true; | o.escapeKeyTriggersCloseButton = true; | ||||
| o.useNativeTitleBar = false; | o.useNativeTitleBar = false; | ||||
| o.resizable = false; | o.resizable = false; | ||||
| @@ -1269,8 +1269,7 @@ static const unsigned char temp_binary_data_4[] = | |||||
| " void paint (Graphics& g) override\r\n" | " void paint (Graphics& g) override\r\n" | ||||
| " {\r\n" | " {\r\n" | ||||
| " // (Our component is opaque, so we must completely fill the background with a solid colour)\r\n" | " // (Our component is opaque, so we must completely fill the background with a solid colour)\r\n" | ||||
| " g.fillAll (Colours::black);\r\n" | |||||
| "\r\n" | |||||
| " g.fillAll (getLookAndFeel().findColour (ResizableWindow::backgroundColourId));\r\n" | |||||
| "\r\n" | "\r\n" | ||||
| " // You can add your drawing code here!\r\n" | " // You can add your drawing code here!\r\n" | ||||
| " }\r\n" | " }\r\n" | ||||
| @@ -1368,8 +1367,7 @@ static const unsigned char temp_binary_data_5[] = | |||||
| " void paint (Graphics& g) override\r\n" | " void paint (Graphics& g) override\r\n" | ||||
| " {\r\n" | " {\r\n" | ||||
| " // (Our component is opaque, so we must completely fill the background with a solid colour)\r\n" | " // (Our component is opaque, so we must completely fill the background with a solid colour)\r\n" | ||||
| " g.fillAll (Colours::black);\r\n" | |||||
| "\r\n" | |||||
| " g.fillAll (getLookAndFeel().findColour (ResizableWindow::backgroundColourId));\r\n" | |||||
| "\r\n" | "\r\n" | ||||
| " // You can add your drawing code here!\r\n" | " // You can add your drawing code here!\r\n" | ||||
| " }\r\n" | " }\r\n" | ||||
| @@ -1428,9 +1426,10 @@ static const unsigned char temp_binary_data_6[] = | |||||
| "//==============================================================================\r\n" | "//==============================================================================\r\n" | ||||
| "void EDITORCLASSNAME::paint (Graphics& g)\r\n" | "void EDITORCLASSNAME::paint (Graphics& g)\r\n" | ||||
| "{\r\n" | "{\r\n" | ||||
| " g.fillAll (Colours::white);\r\n" | |||||
| " // (Our component is opaque, so we must completely fill the background with a solid colour)\r\n" | |||||
| " g.fillAll (getLookAndFeel().findColour (ResizableWindow::backgroundColourId));\r\n" | |||||
| "\r\n" | "\r\n" | ||||
| " g.setColour (Colours::black);\r\n" | |||||
| " g.setColour (Colours::white);\r\n" | |||||
| " g.setFont (15.0f);\r\n" | " g.setFont (15.0f);\r\n" | ||||
| " g.drawFittedText (\"Hello World!\", getLocalBounds(), Justification::centred, 1);\r\n" | " g.drawFittedText (\"Hello World!\", getLocalBounds(), Justification::centred, 1);\r\n" | ||||
| "}\r\n" | "}\r\n" | ||||
| @@ -1901,7 +1900,8 @@ static const unsigned char temp_binary_data_12[] = | |||||
| "\r\n" | "\r\n" | ||||
| "void CONTENTCOMPCLASS::paint (Graphics& g)\r\n" | "void CONTENTCOMPCLASS::paint (Graphics& g)\r\n" | ||||
| "{\r\n" | "{\r\n" | ||||
| " g.fillAll (Colour (0xff001F36));\r\n" | |||||
| " // (Our component is opaque, so we must completely fill the background with a solid colour)\r\n" | |||||
| " g.fillAll (getLookAndFeel().findColour (ResizableWindow::backgroundColourId));\r\n" | |||||
| "\r\n" | "\r\n" | ||||
| " g.setFont (Font (16.0f));\r\n" | " g.setFont (Font (16.0f));\r\n" | ||||
| " g.setColour (Colours::white);\r\n" | " g.setColour (Colours::white);\r\n" | ||||
| @@ -1975,12 +1975,12 @@ static const unsigned char temp_binary_data_14[] = | |||||
| " {\r\n" | " {\r\n" | ||||
| " // You should replace everything in this method with your own drawing code..\r\n" | " // You should replace everything in this method with your own drawing code..\r\n" | ||||
| "\r\n" | "\r\n" | ||||
| " g.fillAll (Colours::white); // clear the background\r\n" | |||||
| " g.fillAll (getLookAndFeel().findColour (ResizableWindow::backgroundColourId)); // clear the background\r\n" | |||||
| "\r\n" | "\r\n" | ||||
| " g.setColour (Colours::grey);\r\n" | " g.setColour (Colours::grey);\r\n" | ||||
| " g.drawRect (getLocalBounds(), 1); // draw an outline around the component\r\n" | " g.drawRect (getLocalBounds(), 1); // draw an outline around the component\r\n" | ||||
| "\r\n" | "\r\n" | ||||
| " g.setColour (Colours::lightblue);\r\n" | |||||
| " g.setColour (Colours::white);\r\n" | |||||
| " g.setFont (14.0f);\r\n" | " g.setFont (14.0f);\r\n" | ||||
| " g.drawText (\"COMPONENTCLASS\", getLocalBounds(),\r\n" | " g.drawText (\"COMPONENTCLASS\", getLocalBounds(),\r\n" | ||||
| " Justification::centred, true); // draw some placeholder text\r\n" | " Justification::centred, true); // draw some placeholder text\r\n" | ||||
| @@ -2333,12 +2333,12 @@ static const unsigned char temp_binary_data_19[] = | |||||
| " drawing code..\r\n" | " drawing code..\r\n" | ||||
| " */\r\n" | " */\r\n" | ||||
| "\r\n" | "\r\n" | ||||
| " g.fillAll (Colours::white); // clear the background\r\n" | |||||
| " g.fillAll (getLookAndFeel().findColour (ResizableWindow::backgroundColourId)); // clear the background\r\n" | |||||
| "\r\n" | "\r\n" | ||||
| " g.setColour (Colours::grey);\r\n" | " g.setColour (Colours::grey);\r\n" | ||||
| " g.drawRect (getLocalBounds(), 1); // draw an outline around the component\r\n" | " g.drawRect (getLocalBounds(), 1); // draw an outline around the component\r\n" | ||||
| "\r\n" | "\r\n" | ||||
| " g.setColour (Colours::lightblue);\r\n" | |||||
| " g.setColour (Colours::white);\r\n" | |||||
| " g.setFont (14.0f);\r\n" | " g.setFont (14.0f);\r\n" | ||||
| " g.drawText (\"COMPONENTCLASS\", getLocalBounds(),\r\n" | " g.drawText (\"COMPONENTCLASS\", getLocalBounds(),\r\n" | ||||
| " Justification::centred, true); // draw some placeholder text\r\n" | " Justification::centred, true); // draw some placeholder text\r\n" | ||||
| @@ -2461,12 +2461,12 @@ static const unsigned char temp_binary_data_23[] = | |||||
| " drawing code..\r\n" | " drawing code..\r\n" | ||||
| " */\r\n" | " */\r\n" | ||||
| "\r\n" | "\r\n" | ||||
| " g.fillAll (Colours::white); // clear the background\r\n" | |||||
| " g.fillAll (getLookAndFeel().findColour (ResizableWindow::backgroundColourId)); // clear the background\r\n" | |||||
| "\r\n" | "\r\n" | ||||
| " g.setColour (Colours::grey);\r\n" | " g.setColour (Colours::grey);\r\n" | ||||
| " g.drawRect (getLocalBounds(), 1); // draw an outline around the component\r\n" | " g.drawRect (getLocalBounds(), 1); // draw an outline around the component\r\n" | ||||
| "\r\n" | "\r\n" | ||||
| " g.setColour (Colours::lightblue);\r\n" | |||||
| " g.setColour (Colours::white);\r\n" | |||||
| " g.setFont (14.0f);\r\n" | " g.setFont (14.0f);\r\n" | ||||
| " g.drawText (\"COMPONENTCLASS\", getLocalBounds(),\r\n" | " g.drawText (\"COMPONENTCLASS\", getLocalBounds(),\r\n" | ||||
| " Justification::centred, true); // draw some placeholder text\r\n" | " Justification::centred, true); // draw some placeholder text\r\n" | ||||
| @@ -5235,26 +5235,26 @@ const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) throw | |||||
| case 0x10b04d10: numBytes = 4971; return gradlew; | case 0x10b04d10: numBytes = 4971; return gradlew; | ||||
| case 0x76cff066: numBytes = 2404; return gradlew_bat; | case 0x76cff066: numBytes = 2404; return gradlew_bat; | ||||
| case 0x34bc1021: numBytes = 11325; return LICENSE; | case 0x34bc1021: numBytes = 11325; return LICENSE; | ||||
| case 0x6cf2645e: numBytes = 1838; return jucer_AnimatedComponentTemplate_cpp; | |||||
| case 0xafccbd3f: numBytes = 3092; return jucer_AudioComponentTemplate_cpp; | |||||
| case 0x27c5a93a: numBytes = 1162; return jucer_AudioPluginEditorTemplate_cpp; | |||||
| case 0x6cf2645e: numBytes = 1887; return jucer_AnimatedComponentTemplate_cpp; | |||||
| case 0xafccbd3f: numBytes = 3141; return jucer_AudioComponentTemplate_cpp; | |||||
| case 0x27c5a93a: numBytes = 1310; return jucer_AudioPluginEditorTemplate_cpp; | |||||
| case 0x4d0721bf: numBytes = 938; return jucer_AudioPluginEditorTemplate_h; | case 0x4d0721bf: numBytes = 938; return jucer_AudioPluginEditorTemplate_h; | ||||
| case 0x51b49ac5: numBytes = 5469; return jucer_AudioPluginFilterTemplate_cpp; | case 0x51b49ac5: numBytes = 5469; return jucer_AudioPluginFilterTemplate_cpp; | ||||
| case 0x488afa0a: numBytes = 2203; return jucer_AudioPluginFilterTemplate_h; | case 0x488afa0a: numBytes = 2203; return jucer_AudioPluginFilterTemplate_h; | ||||
| case 0xabad7041: numBytes = 2151; return jucer_ComponentTemplate_cpp; | case 0xabad7041: numBytes = 2151; return jucer_ComponentTemplate_cpp; | ||||
| case 0xfc72fe86: numBytes = 2064; return jucer_ComponentTemplate_h; | case 0xfc72fe86: numBytes = 2064; return jucer_ComponentTemplate_h; | ||||
| case 0x0b66646c: numBytes = 886; return jucer_ContentCompTemplate_cpp; | |||||
| case 0x0b66646c: numBytes = 1029; return jucer_ContentCompTemplate_cpp; | |||||
| case 0x6fa10171: numBytes = 886; return jucer_ContentCompTemplate_h; | case 0x6fa10171: numBytes = 886; return jucer_ContentCompTemplate_h; | ||||
| case 0x28d496ad: numBytes = 1161; return jucer_InlineComponentTemplate_h; | |||||
| case 0x28d496ad: numBytes = 1208; return jucer_InlineComponentTemplate_h; | |||||
| case 0x8905395b: numBytes = 470; return jucer_MainConsoleAppTemplate_cpp; | case 0x8905395b: numBytes = 470; return jucer_MainConsoleAppTemplate_cpp; | ||||
| case 0x5e5ea047: numBytes = 1992; return jucer_MainTemplate_NoWindow_cpp; | case 0x5e5ea047: numBytes = 1992; return jucer_MainTemplate_NoWindow_cpp; | ||||
| case 0xda2391f8: numBytes = 4001; return jucer_MainTemplate_SimpleWindow_cpp; | case 0xda2391f8: numBytes = 4001; return jucer_MainTemplate_SimpleWindow_cpp; | ||||
| case 0x400bc026: numBytes = 3913; return jucer_MainTemplate_Window_cpp; | case 0x400bc026: numBytes = 3913; return jucer_MainTemplate_Window_cpp; | ||||
| case 0xf4842835: numBytes = 1389; return jucer_NewComponentTemplate_cpp; | |||||
| case 0xf4842835: numBytes = 1436; return jucer_NewComponentTemplate_cpp; | |||||
| case 0xe7bf237a: numBytes = 610; return jucer_NewComponentTemplate_h; | case 0xe7bf237a: numBytes = 610; return jucer_NewComponentTemplate_h; | ||||
| case 0x02a2a077: numBytes = 262; return jucer_NewCppFileTemplate_cpp; | case 0x02a2a077: numBytes = 262; return jucer_NewCppFileTemplate_cpp; | ||||
| case 0x0842c43c: numBytes = 246; return jucer_NewCppFileTemplate_h; | case 0x0842c43c: numBytes = 246; return jucer_NewCppFileTemplate_h; | ||||
| case 0x36e634a1: numBytes = 1588; return jucer_NewInlineComponentTemplate_h; | |||||
| case 0x36e634a1: numBytes = 1635; return jucer_NewInlineComponentTemplate_h; | |||||
| case 0x7fbac252: numBytes = 1716; return jucer_OpenGLComponentTemplate_cpp; | case 0x7fbac252: numBytes = 1716; return jucer_OpenGLComponentTemplate_cpp; | ||||
| case 0x406db5c1: numBytes = 3117; return background_logo_svg; | case 0x406db5c1: numBytes = 3117; return background_logo_svg; | ||||
| case 0x4a0cfd09: numBytes = 151; return background_tile_png; | case 0x4a0cfd09: numBytes = 151; return background_tile_png; | ||||
| @@ -21,13 +21,13 @@ namespace BinaryData | |||||
| const int LICENSESize = 11325; | const int LICENSESize = 11325; | ||||
| extern const char* jucer_AnimatedComponentTemplate_cpp; | extern const char* jucer_AnimatedComponentTemplate_cpp; | ||||
| const int jucer_AnimatedComponentTemplate_cppSize = 1838; | |||||
| const int jucer_AnimatedComponentTemplate_cppSize = 1887; | |||||
| extern const char* jucer_AudioComponentTemplate_cpp; | extern const char* jucer_AudioComponentTemplate_cpp; | ||||
| const int jucer_AudioComponentTemplate_cppSize = 3092; | |||||
| const int jucer_AudioComponentTemplate_cppSize = 3141; | |||||
| extern const char* jucer_AudioPluginEditorTemplate_cpp; | extern const char* jucer_AudioPluginEditorTemplate_cpp; | ||||
| const int jucer_AudioPluginEditorTemplate_cppSize = 1162; | |||||
| const int jucer_AudioPluginEditorTemplate_cppSize = 1310; | |||||
| extern const char* jucer_AudioPluginEditorTemplate_h; | extern const char* jucer_AudioPluginEditorTemplate_h; | ||||
| const int jucer_AudioPluginEditorTemplate_hSize = 938; | const int jucer_AudioPluginEditorTemplate_hSize = 938; | ||||
| @@ -45,13 +45,13 @@ namespace BinaryData | |||||
| const int jucer_ComponentTemplate_hSize = 2064; | const int jucer_ComponentTemplate_hSize = 2064; | ||||
| extern const char* jucer_ContentCompTemplate_cpp; | extern const char* jucer_ContentCompTemplate_cpp; | ||||
| const int jucer_ContentCompTemplate_cppSize = 886; | |||||
| const int jucer_ContentCompTemplate_cppSize = 1029; | |||||
| extern const char* jucer_ContentCompTemplate_h; | extern const char* jucer_ContentCompTemplate_h; | ||||
| const int jucer_ContentCompTemplate_hSize = 886; | const int jucer_ContentCompTemplate_hSize = 886; | ||||
| extern const char* jucer_InlineComponentTemplate_h; | extern const char* jucer_InlineComponentTemplate_h; | ||||
| const int jucer_InlineComponentTemplate_hSize = 1161; | |||||
| const int jucer_InlineComponentTemplate_hSize = 1208; | |||||
| extern const char* jucer_MainConsoleAppTemplate_cpp; | extern const char* jucer_MainConsoleAppTemplate_cpp; | ||||
| const int jucer_MainConsoleAppTemplate_cppSize = 470; | const int jucer_MainConsoleAppTemplate_cppSize = 470; | ||||
| @@ -66,7 +66,7 @@ namespace BinaryData | |||||
| const int jucer_MainTemplate_Window_cppSize = 3913; | const int jucer_MainTemplate_Window_cppSize = 3913; | ||||
| extern const char* jucer_NewComponentTemplate_cpp; | extern const char* jucer_NewComponentTemplate_cpp; | ||||
| const int jucer_NewComponentTemplate_cppSize = 1389; | |||||
| const int jucer_NewComponentTemplate_cppSize = 1436; | |||||
| extern const char* jucer_NewComponentTemplate_h; | extern const char* jucer_NewComponentTemplate_h; | ||||
| const int jucer_NewComponentTemplate_hSize = 610; | const int jucer_NewComponentTemplate_hSize = 610; | ||||
| @@ -78,7 +78,7 @@ namespace BinaryData | |||||
| const int jucer_NewCppFileTemplate_hSize = 246; | const int jucer_NewCppFileTemplate_hSize = 246; | ||||
| extern const char* jucer_NewInlineComponentTemplate_h; | extern const char* jucer_NewInlineComponentTemplate_h; | ||||
| const int jucer_NewInlineComponentTemplate_hSize = 1588; | |||||
| const int jucer_NewInlineComponentTemplate_hSize = 1635; | |||||
| extern const char* jucer_OpenGLComponentTemplate_cpp; | extern const char* jucer_OpenGLComponentTemplate_cpp; | ||||
| const int jucer_OpenGLComponentTemplate_cppSize = 1716; | const int jucer_OpenGLComponentTemplate_cppSize = 1716; | ||||
| @@ -36,8 +36,7 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| // (Our component is opaque, so we must completely fill the background with a solid colour) | // (Our component is opaque, so we must completely fill the background with a solid colour) | ||||
| g.fillAll (Colours::black); | |||||
| g.fillAll (getLookAndFeel().findColour (ResizableWindow::backgroundColourId)); | |||||
| // You can add your drawing code here! | // You can add your drawing code here! | ||||
| } | } | ||||
| @@ -65,8 +65,7 @@ public: | |||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| { | { | ||||
| // (Our component is opaque, so we must completely fill the background with a solid colour) | // (Our component is opaque, so we must completely fill the background with a solid colour) | ||||
| g.fillAll (Colours::black); | |||||
| g.fillAll (getLookAndFeel().findColour (ResizableWindow::backgroundColourId)); | |||||
| // You can add your drawing code here! | // You can add your drawing code here! | ||||
| } | } | ||||
| @@ -27,9 +27,10 @@ EDITORCLASSNAME::~EDITORCLASSNAME() | |||||
| //============================================================================== | //============================================================================== | ||||
| void EDITORCLASSNAME::paint (Graphics& g) | void EDITORCLASSNAME::paint (Graphics& g) | ||||
| { | { | ||||
| g.fillAll (Colours::white); | |||||
| // (Our component is opaque, so we must completely fill the background with a solid colour) | |||||
| g.fillAll (getLookAndFeel().findColour (ResizableWindow::backgroundColourId)); | |||||
| g.setColour (Colours::black); | |||||
| g.setColour (Colours::white); | |||||
| g.setFont (15.0f); | g.setFont (15.0f); | ||||
| g.drawFittedText ("Hello World!", getLocalBounds(), Justification::centred, 1); | g.drawFittedText ("Hello World!", getLocalBounds(), Justification::centred, 1); | ||||
| } | } | ||||
| @@ -21,7 +21,8 @@ CONTENTCOMPCLASS::~CONTENTCOMPCLASS() | |||||
| void CONTENTCOMPCLASS::paint (Graphics& g) | void CONTENTCOMPCLASS::paint (Graphics& g) | ||||
| { | { | ||||
| g.fillAll (Colour (0xff001F36)); | |||||
| // (Our component is opaque, so we must completely fill the background with a solid colour) | |||||
| g.fillAll (getLookAndFeel().findColour (ResizableWindow::backgroundColourId)); | |||||
| g.setFont (Font (16.0f)); | g.setFont (Font (16.0f)); | ||||
| g.setColour (Colours::white); | g.setColour (Colours::white); | ||||
| @@ -17,12 +17,12 @@ public: | |||||
| { | { | ||||
| // You should replace everything in this method with your own drawing code.. | // You should replace everything in this method with your own drawing code.. | ||||
| g.fillAll (Colours::white); // clear the background | |||||
| g.fillAll (getLookAndFeel().findColour (ResizableWindow::backgroundColourId)); // clear the background | |||||
| g.setColour (Colours::grey); | g.setColour (Colours::grey); | ||||
| g.drawRect (getLocalBounds(), 1); // draw an outline around the component | g.drawRect (getLocalBounds(), 1); // draw an outline around the component | ||||
| g.setColour (Colours::lightblue); | |||||
| g.setColour (Colours::white); | |||||
| g.setFont (14.0f); | g.setFont (14.0f); | ||||
| g.drawText ("COMPONENTCLASS", getLocalBounds(), | g.drawText ("COMPONENTCLASS", getLocalBounds(), | ||||
| Justification::centred, true); // draw some placeholder text | Justification::centred, true); // draw some placeholder text | ||||
| @@ -32,12 +32,12 @@ void COMPONENTCLASS::paint (Graphics& g) | |||||
| drawing code.. | drawing code.. | ||||
| */ | */ | ||||
| g.fillAll (Colours::white); // clear the background | |||||
| g.fillAll (getLookAndFeel().findColour (ResizableWindow::backgroundColourId)); // clear the background | |||||
| g.setColour (Colours::grey); | g.setColour (Colours::grey); | ||||
| g.drawRect (getLocalBounds(), 1); // draw an outline around the component | g.drawRect (getLocalBounds(), 1); // draw an outline around the component | ||||
| g.setColour (Colours::lightblue); | |||||
| g.setColour (Colours::white); | |||||
| g.setFont (14.0f); | g.setFont (14.0f); | ||||
| g.drawText ("COMPONENTCLASS", getLocalBounds(), | g.drawText ("COMPONENTCLASS", getLocalBounds(), | ||||
| Justification::centred, true); // draw some placeholder text | Justification::centred, true); // draw some placeholder text | ||||
| @@ -38,12 +38,12 @@ public: | |||||
| drawing code.. | drawing code.. | ||||
| */ | */ | ||||
| g.fillAll (Colours::white); // clear the background | |||||
| g.fillAll (getLookAndFeel().findColour (ResizableWindow::backgroundColourId)); // clear the background | |||||
| g.setColour (Colours::grey); | g.setColour (Colours::grey); | ||||
| g.drawRect (getLocalBounds(), 1); // draw an outline around the component | g.drawRect (getLocalBounds(), 1); // draw an outline around the component | ||||
| g.setColour (Colours::lightblue); | |||||
| g.setColour (Colours::white); | |||||
| g.setFont (14.0f); | g.setFont (14.0f); | ||||
| g.drawText ("COMPONENTCLASS", getLocalBounds(), | g.drawText ("COMPONENTCLASS", getLocalBounds(), | ||||
| Justification::centred, true); // draw some placeholder text | Justification::centred, true); // draw some placeholder text | ||||
| @@ -79,7 +79,10 @@ public: | |||||
| virtual StandaloneFilterWindow* createWindow() | virtual StandaloneFilterWindow* createWindow() | ||||
| { | { | ||||
| return new StandaloneFilterWindow (getApplicationName(), Colours::white, appProperties.getUserSettings(), false); | |||||
| return new StandaloneFilterWindow (getApplicationName(), | |||||
| LookAndFeel::getDefaultLookAndFeel().findColour (ResizableWindow::backgroundColourId), | |||||
| appProperties.getUserSettings(), | |||||
| false); | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -212,7 +212,7 @@ public: | |||||
| o.content->setSize (500, 450); | o.content->setSize (500, 450); | ||||
| o.dialogTitle = TRANS("Audio/MIDI Settings"); | o.dialogTitle = TRANS("Audio/MIDI Settings"); | ||||
| o.dialogBackgroundColour = Colour (0xfff0f0f0); | |||||
| o.dialogBackgroundColour = o.content->getLookAndFeel().findColour (ResizableWindow::backgroundColourId); | |||||
| o.escapeKeyTriggersCloseButton = true; | o.escapeKeyTriggersCloseButton = true; | ||||
| o.useNativeTitleBar = true; | o.useNativeTitleBar = true; | ||||
| o.resizable = false; | o.resizable = false; | ||||
| @@ -396,7 +396,7 @@ public: | |||||
| const String& preferredDefaultDeviceName = String(), | const String& preferredDefaultDeviceName = String(), | ||||
| const AudioDeviceManager::AudioDeviceSetup* preferredSetupOptions = nullptr) | const AudioDeviceManager::AudioDeviceSetup* preferredSetupOptions = nullptr) | ||||
| : DocumentWindow (title, backgroundColour, DocumentWindow::minimiseButton | DocumentWindow::closeButton), | : DocumentWindow (title, backgroundColour, DocumentWindow::minimiseButton | DocumentWindow::closeButton), | ||||
| optionsButton ("options") | |||||
| optionsButton ("Options") | |||||
| { | { | ||||
| setTitleBarButtonsRequired (DocumentWindow::minimiseButton | DocumentWindow::closeButton, false); | setTitleBarButtonsRequired (DocumentWindow::minimiseButton | DocumentWindow::closeButton, false); | ||||
| @@ -34,8 +34,11 @@ public: | |||||
| void paintRowBackground (Graphics& g, int /*rowNumber*/, int /*width*/, int /*height*/, bool rowIsSelected) override | void paintRowBackground (Graphics& g, int /*rowNumber*/, int /*width*/, int /*height*/, bool rowIsSelected) override | ||||
| { | { | ||||
| if (rowIsSelected) | |||||
| g.fillAll (owner.findColour (TextEditor::highlightColourId)); | |||||
| const auto defaultColour = owner.findColour (ListBox::backgroundColourId); | |||||
| const auto c = rowIsSelected ? defaultColour.interpolatedWith (owner.findColour (ListBox::textColourId), 0.5f) | |||||
| : defaultColour; | |||||
| g.fillAll (c); | |||||
| } | } | ||||
| enum | enum | ||||
| @@ -75,9 +78,10 @@ public: | |||||
| if (text.isNotEmpty()) | if (text.isNotEmpty()) | ||||
| { | { | ||||
| const auto defaultTextColour = owner.findColour (ListBox::textColourId); | |||||
| g.setColour (isBlacklisted ? Colours::red | g.setColour (isBlacklisted ? Colours::red | ||||
| : columnId == nameCol ? Colours::black | |||||
| : Colours::grey); | |||||
| : columnId == nameCol ? defaultTextColour | |||||
| : defaultTextColour.interpolatedWith (Colours::transparentBlack, 0.3f)); | |||||
| g.setFont (Font (height * 0.7f, Font::bold)); | g.setFont (Font (height * 0.7f, Font::bold)); | ||||
| g.drawFittedText (text, 4, 0, width - 6, height, Justification::centredLeft, 1, 0.9f); | g.drawFittedText (text, 4, 0, width - 6, height, Justification::centredLeft, 1, 0.9f); | ||||
| } | } | ||||
| @@ -770,13 +770,11 @@ public: | |||||
| return items.size(); | return items.size(); | ||||
| } | } | ||||
| void paintListBoxItem (int row, Graphics& g, int width, int height, bool rowIsSelected) override | |||||
| void paintListBoxItem (int row, Graphics& g, int width, int height, bool) override | |||||
| { | { | ||||
| if (isPositiveAndBelow (row, items.size())) | if (isPositiveAndBelow (row, items.size())) | ||||
| { | { | ||||
| if (rowIsSelected) | |||||
| g.fillAll (findColour (TextEditor::highlightColourId) | |||||
| .withMultipliedAlpha (0.3f)); | |||||
| g.fillAll (findColour (ListBox::backgroundColourId)); | |||||
| const String item (items [row]); | const String item (items [row]); | ||||
| bool enabled = false; | bool enabled = false; | ||||
| @@ -93,7 +93,7 @@ LookAndFeel& Desktop::getDefaultLookAndFeel() noexcept | |||||
| if (currentLookAndFeel == nullptr) | if (currentLookAndFeel == nullptr) | ||||
| { | { | ||||
| if (defaultLookAndFeel == nullptr) | if (defaultLookAndFeel == nullptr) | ||||
| defaultLookAndFeel = new LookAndFeel_V3(); | |||||
| defaultLookAndFeel = new LookAndFeel_V4(); | |||||
| currentLookAndFeel = defaultLookAndFeel; | currentLookAndFeel = defaultLookAndFeel; | ||||
| } | } | ||||
| @@ -206,6 +206,7 @@ extern bool juce_areThereAnyAlwaysOnTopWindows(); | |||||
| #include "lookandfeel/juce_LookAndFeel_V2.cpp" | #include "lookandfeel/juce_LookAndFeel_V2.cpp" | ||||
| #include "lookandfeel/juce_LookAndFeel_V1.cpp" | #include "lookandfeel/juce_LookAndFeel_V1.cpp" | ||||
| #include "lookandfeel/juce_LookAndFeel_V3.cpp" | #include "lookandfeel/juce_LookAndFeel_V3.cpp" | ||||
| #include "lookandfeel/juce_LookAndFeel_V4.cpp" | |||||
| #include "menus/juce_MenuBarComponent.cpp" | #include "menus/juce_MenuBarComponent.cpp" | ||||
| #include "menus/juce_MenuBarModel.cpp" | #include "menus/juce_MenuBarModel.cpp" | ||||
| #include "menus/juce_PopupMenu.cpp" | #include "menus/juce_PopupMenu.cpp" | ||||
| @@ -282,6 +282,7 @@ class FlexBox; | |||||
| #include "lookandfeel/juce_LookAndFeel_V2.h" | #include "lookandfeel/juce_LookAndFeel_V2.h" | ||||
| #include "lookandfeel/juce_LookAndFeel_V1.h" | #include "lookandfeel/juce_LookAndFeel_V1.h" | ||||
| #include "lookandfeel/juce_LookAndFeel_V3.h" | #include "lookandfeel/juce_LookAndFeel_V3.h" | ||||
| #include "lookandfeel/juce_LookAndFeel_V4.h" | |||||
| #if JUCE_LINUX | #if JUCE_LINUX | ||||
| #include "native/juce_linux_X11.h" | #include "native/juce_linux_X11.h" | ||||
| @@ -0,0 +1,238 @@ | |||||
| /* | |||||
| ============================================================================== | |||||
| This file is part of the JUCE library. | |||||
| Copyright (c) 2015 - ROLI Ltd. | |||||
| Permission is granted to use this software under the terms of either: | |||||
| a) the GPL v2 (or any later version) | |||||
| b) the Affero GPL v3 | |||||
| Details of these licenses can be found at: www.gnu.org/licenses | |||||
| JUCE is distributed in the hope that it will be useful, but WITHOUT ANY | |||||
| WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR | |||||
| A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |||||
| ------------------------------------------------------------------------------ | |||||
| To release a closed-source product which uses JUCE, commercial licenses are | |||||
| available: visit www.juce.com for more information. | |||||
| ============================================================================== | |||||
| */ | |||||
| #pragma once | |||||
| class JUCE_API LookAndFeel_V4 : public LookAndFeel_V3 | |||||
| { | |||||
| public: | |||||
| /** | |||||
| A struct containing the set of colours to apply to the GUI | |||||
| */ | |||||
| class ColourScheme | |||||
| { | |||||
| public: | |||||
| /** The standard set of colours to use. */ | |||||
| enum UIColour | |||||
| { | |||||
| windowBackground = 0, | |||||
| widgetBackground, | |||||
| menuBackground, | |||||
| outline, | |||||
| defaultText, | |||||
| defaultFill, | |||||
| highlightedText, | |||||
| highlightedFill, | |||||
| menuText, | |||||
| numColours | |||||
| }; | |||||
| template <typename... ItemColours> | |||||
| ColourScheme (ItemColours... coloursToUse) | |||||
| { | |||||
| static_assert (sizeof... (coloursToUse) == numColours, "Must supply one colour for each UIColour item"); | |||||
| const Colour c[] = { Colour (coloursToUse)... }; | |||||
| for (int i = 0; i < numColours; ++i) | |||||
| palette[i] = c[i]; | |||||
| } | |||||
| ColourScheme (const ColourScheme&) = default; | |||||
| ColourScheme& operator= (const ColourScheme&) = default; | |||||
| /** Returns a colour from the scheme */ | |||||
| Colour getUIColour (UIColour colourToGet) const noexcept; | |||||
| /** Sets a scheme colour. */ | |||||
| void setUIColour (UIColour colourToSet, Colour newColour) noexcept; | |||||
| /** Returns true if two ColourPalette objects contain the same colours. */ | |||||
| bool operator== (const ColourScheme&) const noexcept; | |||||
| /** Returns false if two ColourPalette objects contain the same colours. */ | |||||
| bool operator!= (const ColourScheme&) const noexcept; | |||||
| private: | |||||
| Colour palette[numColours]; | |||||
| }; | |||||
| //============================================================================== | |||||
| /** Creates a LookAndFeel_V4 object with a default colour scheme. */ | |||||
| LookAndFeel_V4(); | |||||
| /** Creates a LookAndFeel_V4 object with a given colour scheme. */ | |||||
| LookAndFeel_V4 (ColourScheme); | |||||
| /** Destructor. */ | |||||
| ~LookAndFeel_V4(); | |||||
| //============================================================================== | |||||
| void setColourScheme (ColourScheme); | |||||
| ColourScheme& getCurrentColourScheme() noexcept { return currentColourScheme; } | |||||
| static ColourScheme getDarkColourScheme(); | |||||
| static ColourScheme getMidnightColourScheme(); | |||||
| static ColourScheme getGreyColourScheme(); | |||||
| static ColourScheme getLightColourScheme(); | |||||
| //============================================================================== | |||||
| Button* createDocumentWindowButton (int) override; | |||||
| void positionDocumentWindowButtons (DocumentWindow&, int, int, int, int, Button*, Button*, Button*, bool) override; | |||||
| void drawDocumentWindowTitleBar (DocumentWindow&, Graphics&, int, int, int, int, const Image*, bool) override; | |||||
| //============================================================================== | |||||
| void drawButtonBackground (Graphics&, Button&, const Colour& backgroundColour, | |||||
| bool isMouseOverButton, bool isButtonDown) override; | |||||
| void drawToggleButton (Graphics&, ToggleButton&, bool isMouseOverButton, bool isButtonDown) override; | |||||
| void drawTickBox (Graphics&, Component&, | |||||
| float x, float y, float w, float h, | |||||
| bool ticked, bool isEnabled, bool isMouseOverButton, bool isButtonDown) override; | |||||
| //============================================================================== | |||||
| AlertWindow* createAlertWindow (const String& title, const String& message, | |||||
| const String& button1, | |||||
| const String& button2, | |||||
| const String& button3, | |||||
| AlertWindow::AlertIconType iconType, | |||||
| int numButtons, Component* associatedComponent) override; | |||||
| void drawAlertBox (Graphics&, AlertWindow&, const Rectangle<int>& textArea, TextLayout&) override; | |||||
| int getAlertWindowButtonHeight() override; | |||||
| Font getAlertWindowTitleFont() override; | |||||
| Font getAlertWindowMessageFont() override; | |||||
| Font getAlertWindowFont() override; | |||||
| //============================================================================== | |||||
| void drawProgressBar (Graphics&, ProgressBar&, int width, int height, double progress, const String& textToShow) override; | |||||
| bool isProgressBarOpaque (ProgressBar&) override { return false; } | |||||
| //============================================================================== | |||||
| int getDefaultScrollbarWidth() override; | |||||
| void drawScrollbar (Graphics&, ScrollBar&, int x, int y, int width, int height, bool isScrollbarVertical, | |||||
| int thumbStartPosition, int thumbSize, bool isMouseOver, bool isMouseDown) override; | |||||
| //============================================================================== | |||||
| Path getTickShape (float height) override; | |||||
| Path getCrossShape (float height) override; | |||||
| //============================================================================== | |||||
| void fillTextEditorBackground (Graphics&, int width, int height, TextEditor&) override; | |||||
| void drawTextEditorOutline (Graphics&, int width, int height, TextEditor&) override; | |||||
| //============================================================================== | |||||
| Button* createFileBrowserGoUpButton() override; | |||||
| void layoutFileBrowserComponent (FileBrowserComponent&, | |||||
| DirectoryContentsDisplayComponent*, | |||||
| FilePreviewComponent*, | |||||
| ComboBox* currentPathBox, | |||||
| TextEditor* filenameBox, | |||||
| Button* goUpButton) override; | |||||
| void drawFileBrowserRow (Graphics&, int width, int height, | |||||
| const String& filename, Image* icon, | |||||
| const String& fileSizeDescription, const String& fileTimeDescription, | |||||
| bool isDirectory, bool isItemSelected, int itemIndex, | |||||
| DirectoryContentsDisplayComponent&) override; | |||||
| //============================================================================== | |||||
| void drawPopupMenuItem (Graphics&, const Rectangle<int>& area, | |||||
| bool isSeparator, bool isActive, bool isHighlighted, bool isTicked, bool hasSubMenu, | |||||
| const String& text, const String& shortcutKeyText, | |||||
| const Drawable* icon, const Colour* textColour) override; | |||||
| void getIdealPopupMenuItemSize (const String& text, bool isSeparator, int standardMenuItemHeight, | |||||
| int& idealWidth, int& idealHeight) override; | |||||
| void drawMenuBarBackground (Graphics&, int width, int height, bool isMouseOverBar, MenuBarComponent&) override; | |||||
| void drawMenuBarItem (Graphics&, int width, int height, | |||||
| int itemIndex, const String& itemText, | |||||
| bool isMouseOverItem, bool isMenuOpen, bool isMouseOverBar, | |||||
| MenuBarComponent&) override; | |||||
| //============================================================================== | |||||
| void drawComboBox (Graphics&, int width, int height, bool isButtonDown, | |||||
| int buttonX, int buttonY, int buttonW, int buttonH, | |||||
| ComboBox&) override; | |||||
| Font getComboBoxFont (ComboBox&) override; | |||||
| void positionComboBoxText (ComboBox&, Label&) override; | |||||
| //============================================================================== | |||||
| void drawLinearSlider (Graphics&, int x, int y, int width, int height, | |||||
| float sliderPos, float minSliderPos, float maxSliderPos, | |||||
| const Slider::SliderStyle, Slider&) override; | |||||
| void drawRotarySlider (Graphics&, int x, int y, int width, int height, | |||||
| float sliderPosProportional, float rotaryStartAngle, | |||||
| float rotaryEndAngle, Slider&) override; | |||||
| void drawPointer (Graphics&, float x, float y, float diameter, | |||||
| const Colour&, int direction) noexcept; | |||||
| //============================================================================== | |||||
| void drawTooltip (Graphics&, const String& text, int width, int height) override; | |||||
| //============================================================================== | |||||
| void drawConcertinaPanelHeader (Graphics&, const Rectangle<int>& area, | |||||
| bool isMouseOver, bool isMouseDown, | |||||
| ConcertinaPanel&, Component& panel) override; | |||||
| //============================================================================== | |||||
| void drawLevelMeter (Graphics&, int, int, float) override; | |||||
| //============================================================================== | |||||
| void paintToolbarBackground (Graphics&, int width, int height, Toolbar&) override; | |||||
| void paintToolbarButtonLabel (Graphics&, int x, int y, int width, int height, | |||||
| const String& text, ToolbarItemComponent&) override; | |||||
| //============================================================================== | |||||
| void drawPropertyPanelSectionHeader (Graphics&, const String& name, bool isOpen, int width, int height) override; | |||||
| void drawPropertyComponentBackground (Graphics&, int width, int height, PropertyComponent&) override; | |||||
| void drawPropertyComponentLabel (Graphics&, int width, int height, PropertyComponent&) override; | |||||
| Rectangle<int> getPropertyComponentContentPosition (PropertyComponent&) override; | |||||
| //============================================================================== | |||||
| void drawCallOutBoxBackground (CallOutBox&, Graphics&, const Path&, Image&) override; | |||||
| //============================================================================== | |||||
| void drawStretchableLayoutResizerBar (Graphics&, int, int, bool, bool, bool) override; | |||||
| private: | |||||
| //============================================================================== | |||||
| void drawLinearProgressBar (Graphics&, ProgressBar&, int width, int height, double progress); | |||||
| void drawCircularProgressBar (Graphics&, ProgressBar&, const String&); | |||||
| int getPropertyComponentIndent (PropertyComponent&); | |||||
| //============================================================================== | |||||
| void initialiseColours(); | |||||
| ColourScheme currentColourScheme; | |||||
| //============================================================================== | |||||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LookAndFeel_V4) | |||||
| }; | |||||