1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

DLL build fix + minor clean-ups.

This commit is contained in:
jules 2012-09-26 14:47:37 +01:00
parent eea5e74af4
commit 9239842120
3 changed files with 9 additions and 11 deletions

View file

@ -202,15 +202,15 @@ public:
void paint (Graphics& g)
{
const float yScale = 1.0f / (getHeight() - edge * 2);
ColourGradient cg;
cg.point1.setXY (0.0f, (float) edge);
cg.point2.setXY (0.0f, (float) (getHeight() - edge));
const Rectangle<int> clip (g.getClipBounds());
for (float i = 0.0f; i <= 1.0f; i += 0.02f)
cg.addColour (i, Colour (i, 1.0f, 1.0f, 1.0f));
for (int y = jmin (clip.getBottom(), getHeight() - edge); --y >= jmax (edge, clip.getY());)
{
g.setColour (Colour ((y - edge) * yScale, 1.0f, 1.0f, 1.0f));
g.fillRect (edge, y, getWidth() - edge * 2, 1);
}
g.setGradientFill (cg);
g.fillRect (getLocalBounds().reduced (edge));
}
void resized()