Set lookandfeel earlier on, and set colour for highlighting menu bar

pull/170/head
James Ball 2023-12-21 16:18:34 +00:00
rodzic f810a73a2e
commit 2fa34819d9
2 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -22,6 +22,7 @@ OscirenderLookAndFeel::OscirenderLookAndFeel() {
setColour(juce::PopupMenu::highlightedBackgroundColourId, Colours::darker);
setColour(juce::TooltipWindow::backgroundColourId, Colours::veryDark);
setColour(juce::TooltipWindow::outlineColourId, juce::Colours::white);
setColour(juce::TextButton::buttonOnColourId, Colours::darker);
// combo box
setColour(juce::ComboBox::backgroundColourId, Colours::veryDark);
@ -78,6 +79,9 @@ OscirenderLookAndFeel::OscirenderLookAndFeel() {
// UI colours
getCurrentColourScheme().setUIColour(ColourScheme::widgetBackground, Colours::veryDark);
getCurrentColourScheme().setUIColour(ColourScheme::UIColour::defaultFill, Colours::accentColor);
// I have to do this, otherwise components are initialised before the look and feel is set
juce::LookAndFeel::setDefaultLookAndFeel(this);
}
void OscirenderLookAndFeel::drawComboBox(juce::Graphics& g, int width, int height, bool, int, int, int, int, juce::ComboBox& box) {

Wyświetl plik

@ -5,7 +5,6 @@
OscirenderAudioProcessorEditor::OscirenderAudioProcessorEditor(OscirenderAudioProcessor& p)
: AudioProcessorEditor(&p), audioProcessor(p), collapseButton("Collapse", juce::Colours::white, juce::Colours::white, juce::Colours::white)
{
juce::Desktop::getInstance().setDefaultLookAndFeel(&lookAndFeel);
setLookAndFeel(&lookAndFeel);
addAndMakeVisible(volume);