chore: land janitor round 1 and graft integration
Round 1 findings and fixes, all previously uncommitted: - FXProcessor per-slot DSP history repair (HEAD does not compile without it) - SynthVoice::getModulationValue, editor control-lock guard - ExactCompare.h naming the deliberate exact float comparisons - KnobLookAndFeel replacing the never-installed SerumLookAndFeel - 55 first-party compiler warnings to 0 - AGENT.md renamed to AGENTS.md across Source/ - graft repository context graph and its hooks - JANITOR_TASKS.md and UI_UX_AUDIT.md records
This commit is contained in:
1 parent
5c942cad0c
commit
e4cea300db
63 files changed
+2360
-805
No files matched your search
@@ -33,21 +33,29 @@ void ToggleButton::paint (juce::Graphics& g)
|
||||
const float ledSize = juce::jmin (bounds.getHeight() - 16.0f, 16.0f);
|
||||
const juce::Rectangle<float> led ((bounds.getWidth() - ledSize) * 0.5f, 4.0f, ledSize, ledSize);
|
||||
|
||||
const bool live = isEnabled();
|
||||
const bool hovered = live && isMouseOverOrDragging();
|
||||
|
||||
if (state)
|
||||
{
|
||||
g.setColour (onColour.withAlpha (0.35f));
|
||||
// Hover brightens the halo, disabled dims it, so the three states are
|
||||
// distinguishable without relying on colour alone.
|
||||
const float halo = live ? (hovered ? 0.55f : 0.35f) : 0.15f;
|
||||
g.setColour (onColour.withAlpha (halo));
|
||||
g.fillEllipse (led.expanded (6.0f));
|
||||
g.setColour (onColour);
|
||||
g.setColour (live ? onColour : onColour.withAlpha (0.4f));
|
||||
}
|
||||
else
|
||||
{
|
||||
g.setColour (theme::outline);
|
||||
g.setColour (hovered ? theme::textDim : theme::outline);
|
||||
}
|
||||
g.fillEllipse (led);
|
||||
g.setColour (state ? juce::Colours::black : theme::textDim);
|
||||
g.drawEllipse (led, 1.0f);
|
||||
g.drawEllipse (led, live ? (hovered ? 1.6f : 1.0f) : 0.8f);
|
||||
|
||||
g.setColour (state ? theme::text : theme::textDim);
|
||||
const auto labelColour = ! live ? theme::outline
|
||||
: (state ? theme::text : (hovered ? theme::text : theme::textDim));
|
||||
g.setColour (labelColour);
|
||||
g.setFont (juce::Font (11.0f));
|
||||
g.drawText (label, 0, (int) (led.getBottom() + 2), getWidth(), 14, juce::Justification::centred, false);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user