Skip to content

Commit

Permalink
Fix audio input being disabled, improve checkbox lookandfeel, allow l…
Browse files Browse the repository at this point in the history
…fo sliders to be more granular
  • Loading branch information
jameshball committed Apr 4, 2024
1 parent 937f599 commit 4052788
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
11 changes: 6 additions & 5 deletions Source/LookAndFeel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ OscirenderLookAndFeel::OscirenderLookAndFeel() {
setColour(sliderThumbOutlineColourId, juce::Colours::white);

// buttons
setColour(juce::ToggleButton::tickDisabledColourId, juce::Colours::white);
setColour(juce::TextButton::buttonColourId, Colours::veryDark);
setColour(jux::SwitchButton::switchColour, juce::Colours::white);
setColour(jux::SwitchButton::switchOnBackgroundColour, Colours::accentColor);
setColour(jux::SwitchButton::switchOffBackgroundColour, Colours::dark);
setColour(jux::SwitchButton::switchOffBackgroundColour, Colours::grey);

// windows & menus
setColour(juce::ResizableWindow::backgroundColourId, Colours::grey);
Expand Down Expand Up @@ -200,9 +199,7 @@ void OscirenderLookAndFeel::drawTickBox(juce::Graphics& g, juce::Component& comp
juce::Rectangle<float> tickBounds(x, y, w, h);

g.setColour(component.findColour(juce::TextButton::buttonColourId));
g.fillRect(tickBounds);
g.setColour(component.findColour(juce::ToggleButton::tickDisabledColourId));
g.drawRect(tickBounds, 1.0f);
g.fillRoundedRectangle(tickBounds, RECT_RADIUS);

if (ticked) {
g.setColour(component.findColour(juce::ToggleButton::tickColourId));
Expand Down Expand Up @@ -314,6 +311,10 @@ void OscirenderLookAndFeel::drawCornerResizer(juce::Graphics&, int w, int h, boo

}

void OscirenderLookAndFeel::drawToggleButton (juce::Graphics& g, juce::ToggleButton& button, bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown) {
LookAndFeel_V4::drawToggleButton(g, button, shouldDrawButtonAsHighlighted, shouldDrawButtonAsDown);
}

juce::CodeEditorComponent::ColourScheme OscirenderLookAndFeel::getDefaultColourScheme() {
juce::CodeEditorComponent::ColourScheme cs;

Expand Down
1 change: 1 addition & 0 deletions Source/LookAndFeel.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,5 @@ class OscirenderLookAndFeel : public juce::LookAndFeel_V4 {
juce::CodeEditorComponent::ColourScheme getDefaultColourScheme();
void drawTooltip(juce::Graphics& g, const juce::String& text, int width, int height) override;
void drawCornerResizer(juce::Graphics&, int w, int h, bool isMouseOver, bool isMouseDragging) override;
void drawToggleButton(juce::Graphics&, juce::ToggleButton&, bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown) override;
};
2 changes: 1 addition & 1 deletion Source/audio/EffectParameter.h
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ class EffectParameter : public FloatParameter {
public:
std::atomic<bool> smoothValueChange = true;
LfoTypeParameter* lfo = new LfoTypeParameter(name + " LFO", paramID + "Lfo", getVersionHint(), 1);
FloatParameter* lfoRate = new FloatParameter(name + " LFO Rate", paramID + "LfoRate", getVersionHint(), 1.0f, 0.0f, 1000.0f, 0.1f, "Hz");
FloatParameter* lfoRate = new FloatParameter(name + " LFO Rate", paramID + "LfoRate", getVersionHint(), 1.0f, 0.0f, 1000.0f, 0.01f, "Hz");
BooleanParameter* sidechain = new BooleanParameter(name + " Sidechain Enabled", paramID + "Sidechain", getVersionHint(), false);
std::atomic<float> phase = 0.0f;
juce::String description;
Expand Down
4 changes: 2 additions & 2 deletions osci-render.jucer
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

<JUCERPROJECT id="HH2E72" name="osci-render" projectType="audioplug" useAppConfig="0"
addUsingNamespaceToJuceHeader="0" displaySplashScreen="0" jucerFormatVersion="1"
pluginCharacteristicsValue="pluginIsSynth,pluginProducesMidiOut,pluginWantsMidiIn"
pluginCharacteristicsValue="pluginProducesMidiOut,pluginWantsMidiIn"
pluginManufacturer="jameshball" aaxIdentifier="sh.ball.oscirender"
cppLanguageStandard="20" projectLineFeed="&#10;" headerPath="./include"
version="2.1.4" companyName="James H Ball" companyWebsite="https://osci-render.com"
version="2.1.5" companyName="James H Ball" companyWebsite="https://osci-render.com"
companyEmail="[email protected]" defines="NOMINMAX=1">
<MAINGROUP id="j5Ge2T" name="osci-render">
<GROUP id="{5ABCED88-0059-A7AF-9596-DBF91DDB0292}" name="Resources">
Expand Down

0 comments on commit 4052788

Please sign in to comment.