cleanup; small changes to PluginEditor

This commit is contained in:
Armin 2026-07-14 01:45:51 +02:00
commit bf68dee6b3
3 changed files with 9 additions and 3 deletions

View file

@ -77,9 +77,15 @@ void ComboBoxLookAndFeel::drawComboBox(juce::Graphics& g, int width, int height,
g.fillRoundedRectangle(bounds.getX() + 1.5f, bounds.getY() + 2.0f, g.fillRoundedRectangle(bounds.getX() + 1.5f, bounds.getY() + 2.0f,
bounds.getWidth(), bounds.getHeight(), 4.0f); bounds.getWidth(), bounds.getHeight(), 4.0f);
// Body gradient — light top to dark bottom for 3D raised look // Body gradient — spotlight at 88° from horizontal (near-vertical, subtle tilt)
juce::ColourGradient bodyGrad(juce::Colour(0xff404040), bounds.getCentreX(), bounds.getY(), float spotlightAngle = 88.0f * juce::MathConstants<float>::pi / 180.0f;
juce::Colour(0xff1a1a1a), bounds.getCentreX(), bounds.getBottom(), true); float sdx = std::cos(spotlightAngle);
float sdy = std::sin(spotlightAngle);
float scx = bounds.getCentreX();
float scy = bounds.getCentreY();
float slen = std::hypot(bounds.getWidth(), bounds.getHeight()) * 0.5f;
juce::ColourGradient bodyGrad(juce::Colour(0xff404040), scx - sdx * slen, scy - sdy * slen,
juce::Colour(0xff1a1a1a), scx + sdx * slen, scy + sdy * slen, true);
g.setGradientFill(bodyGrad); g.setGradientFill(bodyGrad);
g.fillRoundedRectangle(bounds, 4.0f); g.fillRoundedRectangle(bounds, 4.0f);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 MiB

After

Width:  |  Height:  |  Size: 587 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB