Cabbage Logo
Back to Cabbage Site

How to hide the plugin GUI right panel

I need to fix an issue in the patcher. The menu system is broken since I removed it as a child from the main application. I knew there was a good reason to keep it there. I’ll take a look.

I’ll also pushed some code to change the colour of the new project window. If you see any more default green let me know and I’ll zap it.

Are you sure you pushed it? I don’t see it…

Sorry, should be there now.

I noticed that when you are in EDIT GUI mode, if you close the plugin window with its top-right ‘X’ button (or close the property panel with that little x), the Edit GUI button in the filetab remains in its edit state, when it should return in its normal state. I fixed this.

Another thing I noticed, after your latest commits, is that the text colours of the settings window was always black (and actually black it’s too dark to see over that dark-blue background colour). I knew that the PropertyPanelLookAndFeel class would be useful sooner or later, so I used it to set the colours of the setting windows to make them more readable and adaptable to the user custom colours (being that miscPanel and colourPanel are two PropertyPanel objects).

I made a PR with these mods.

But now I have a problem: I cannot understand how to make the “Audio and MIDI” settings text colour change from its default black, because it isn’t a PropertyPanel obejct like the miscPanel and colourPanel, so I cannot use my PropertyPanelLookAndFeel class for it. Can you help?

Great. Thanks again. So in CabbageSettingsWindow.cpp, do this:

audioDeviceSelector->getLookAndFeel().setColour(Label::ColourIds::textColourId, Colours::white);
audioDeviceSelector->lookAndFeelChanged();

You can access the saved colour in the user settings using CabbageSettings::getColourFromValueTree()

1 Like

Thanks, it works!
But the checkbox flag and text colour for “Output channel 1 + 2” remains black…

P.S.: I tried with this, but doesn’t work:

audioDeviceSelector->getLookAndFeel().setColour(ToggleButton::ColourIds::textColourId, labelTextColour);

Found!

It was a ListBox, so this works:

audioDeviceSelector->getLookAndFeel().setColour(ListBox::ColourIds::textColourId, labelTextColour);

Yeah, I got that myself after a fair bit of searched. It was well hidden!

I have to say, Juce code can be really intricated…
Made a PR with the mods.