mirror of
https://codeberg.org/armin/chromaflock.git
synced 2026-09-01 04:10:47 +02:00
cleanup; small changes to PluginEditor
This commit is contained in:
parent
6432ab060d
commit
bf68dee6b3
3 changed files with 9 additions and 3 deletions
|
|
@ -77,9 +77,15 @@ void ComboBoxLookAndFeel::drawComboBox(juce::Graphics& g, int width, int height,
|
|||
g.fillRoundedRectangle(bounds.getX() + 1.5f, bounds.getY() + 2.0f,
|
||||
bounds.getWidth(), bounds.getHeight(), 4.0f);
|
||||
|
||||
// Body gradient — light top to dark bottom for 3D raised look
|
||||
juce::ColourGradient bodyGrad(juce::Colour(0xff404040), bounds.getCentreX(), bounds.getY(),
|
||||
juce::Colour(0xff1a1a1a), bounds.getCentreX(), bounds.getBottom(), true);
|
||||
// Body gradient — spotlight at 88° from horizontal (near-vertical, subtle tilt)
|
||||
float spotlightAngle = 88.0f * juce::MathConstants<float>::pi / 180.0f;
|
||||
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.fillRoundedRectangle(bounds, 4.0f);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue