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:
parent
eea5e74af4
commit
9239842120
3 changed files with 9 additions and 11 deletions
|
|
@ -122,7 +122,7 @@
|
|||
#ifdef __INTEL_COMPILER
|
||||
#pragma warning (disable: 1125) // (virtual override warning)
|
||||
#endif
|
||||
#elif defined (JUCE_DLL_BUILD)
|
||||
#elif defined (JUCE_DLL) || defined (JUCE_DLL_BUILD)
|
||||
#define JUCE_API __attribute__ ((visibility("default")))
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1193,9 +1193,7 @@ void PopupMenu::addCommandItem (ApplicationCommandManager* commandManager,
|
|||
{
|
||||
jassert (commandManager != nullptr && commandID != 0);
|
||||
|
||||
const ApplicationCommandInfo* const registeredInfo = commandManager->getCommandForID (commandID);
|
||||
|
||||
if (registeredInfo != nullptr)
|
||||
if (const ApplicationCommandInfo* const registeredInfo = commandManager->getCommandForID (commandID))
|
||||
{
|
||||
ApplicationCommandInfo info (*registeredInfo);
|
||||
ApplicationCommandTarget* const target = commandManager->getTargetForCommand (commandID, info);
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue