Example #1
0
void ComboBox::lookAndFeelChanged()
{
    repaint();

    {
        ScopedPointer<Label> newLabel (getLookAndFeel().createComboBoxTextBox (*this));
        jassert (newLabel != nullptr);

        if (label != nullptr)
        {
            newLabel->setEditable (label->isEditable());
            newLabel->setJustificationType (label->getJustificationType());
            newLabel->setTooltip (label->getTooltip());
            newLabel->setText (label->getText(), dontSendNotification);
        }

        label = newLabel;
    }

    addAndMakeVisible (label);
    setWantsKeyboardFocus (! label->isEditable());

    label->addListener (this);
    label->addMouseListener (this, false);

    label->setColour (Label::backgroundColourId, Colours::transparentBlack);
    label->setColour (Label::textColourId, findColour (ComboBox::textColourId));

    label->setColour (TextEditor::textColourId, findColour (ComboBox::textColourId));
    label->setColour (TextEditor::backgroundColourId, Colours::transparentBlack);
    label->setColour (TextEditor::highlightColourId, findColour (TextEditor::highlightColourId));
    label->setColour (TextEditor::outlineColourId, Colours::transparentBlack);

    resized();
}
Example #2
0
        AboutUsComponent() : 
          csPlayerLabel(nullptr), csPlayerDetailTE(nullptr), csTeamTE(nullptr), csLicenceTE(nullptr),
              csPlayerSource(nullptr), csPlayerSite(nullptr), 
              csPlayerGroupComponent(nullptr), csTeamgroupComponent(nullptr), csLicencegroupComponent(nullptr)
          {
              LookAndFeel::getDefaultLookAndFeel().setColour(TextEditor::textColourId, Colours::grey);
              setLookAndFeel(&LookAndFeel::getDefaultLookAndFeel());
              addAndMakeVisible (csPlayerLabel = new Label ("scPlayer", "Server-Client Audio Player"));
              csPlayerLabel->setFont (Font (20.0000f, Font::bold));
              csPlayerLabel->setJustificationType (Justification::centredLeft);
              csPlayerLabel->setEditable (false, false, false);
              csPlayerLabel->setColour (TextEditor::backgroundColourId, Colour (0x0));
              
              addAndMakeVisible (csPlayerGroupComponent = new GroupComponent ("ScPlayer group", "ScPlayer"));
              addAndMakeVisible (csPlayerDetailTE = new TextEditor ("scPlayer Details"));
              csPlayerDetailTE->setFont (Font (13.30f, Font::plain));
              csPlayerDetailTE->setReadOnly (true);
              csPlayerDetailTE->setMultiLine(true, true);
              csPlayerDetailTE->setText("ScPlayer \"Server Client Audio Player\" is C++ based "
                                        "Music player built using Juce and DrowAudio for Network "
                                        "teams to play their server placed "
                                        "music in the network. ScPlayer is Server "
                                        "Audio Player and Client player Manager kind of application.");
              csPlayerDetailTE->setColour (TextEditor::outlineColourId, Colour (0x0));
              csPlayerDetailTE->setColour (TextEditor::focusedOutlineColourId, Colour (0x0));
              csPlayerDetailTE->setColour (TextEditor::shadowColourId, Colour (0x0));
              csPlayerDetailTE->setColour (TextEditor::textColourId, Colours::grey);
              csPlayerDetailTE->setColour (TextEditor::backgroundColourId, Colour (0x0));

              addAndMakeVisible (csTeamgroupComponent = new GroupComponent ("ScTeam group", "ScTeam"));
              addAndMakeVisible (csTeamTE = new TextEditor ("scTeam Details"));
              csTeamTE->setFont (Font (13.0000f, Font::plain));
              csTeamTE->setMultiLine(true, true);
              csTeamTE->setText("ScTeam is group of people willingly developes ScPlayer. "
                  "CyberCBM Owns most rights (Though GPUV2 Licence) and responsible for work inside ScPlayer. "
                                "Other helping Members in CsTeam are NREZ, Hammer, PD, Vrushabh.");
              csTeamTE->setReadOnly (true);
              csTeamTE->setColour (TextEditor::outlineColourId, Colour (0x0));
              csTeamTE->setColour (TextEditor::focusedOutlineColourId, Colour (0x0));
              csTeamTE->setColour (TextEditor::shadowColourId, Colour (0x0));
              csTeamTE->setColour (TextEditor::textColourId, Colours::grey);
              csTeamTE->setColour (TextEditor::backgroundColourId, Colour (0x0));

              addAndMakeVisible (csLicencegroupComponent = new GroupComponent ("Licence group", "Licence: GPU-V2"));
              addAndMakeVisible (csLicenceTE = new TextEditor ("scLicence Details"));
              csLicenceTE->setFont (Font (13.0000f, Font::plain));
              csLicenceTE->setMultiLine(true, true);
              csLicenceTE->setText("This program is free software; you can redistribute it and/or modify "
                                    "it under the terms of the GNU General Public License as published by "
                                    "the Free Software Foundation; either version 2 of the License, or "
                                    "(at your option) any later version.\n\n"
                                    "This program 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. ");
              csLicenceTE->setReadOnly (true);
              csLicenceTE->setColour (TextEditor::outlineColourId, Colour (0x0));
              csLicenceTE->setColour (TextEditor::focusedOutlineColourId, Colour (0x0));
              csLicenceTE->setColour (TextEditor::shadowColourId, Colour (0x0));
              csLicenceTE->setColour (TextEditor::outlineColourId, Colour (0x0));
              csLicenceTE->setColour (TextEditor::textColourId, Colours::grey);
              csLicenceTE->setColour (TextEditor::backgroundColourId, Colour (0x0));

              addAndMakeVisible (csPlayerSite = new HyperlinkButton ("ScPlayer", URL ("https://cybercbm.github.com/ScPlayer")));
              csPlayerSite->setFont(Font (16.0000f, Font::bold), false, Justification::centred);
              addAndMakeVisible (csPlayerSource = new HyperlinkButton ("Get ScPlayer Source Code", URL ("https://github.com/cyberCBM/ScPlayer")));
              csPlayerSource->setFont(Font (16.0000f, Font::bold), false, Justification::centred);

          }