Skip to content

Commit f2afd1c

Browse files
committed
Merge branch development-juce8 into testing-juce8
2 parents 0c953aa + 204dda7 commit f2afd1c

4 files changed

Lines changed: 16 additions & 14 deletions

File tree

Source/Processors/Editors/GenericEditor.cpp

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -871,25 +871,24 @@ void UtilityButton::paintButton (Graphics& g, bool isMouseOver, bool isButtonDow
871871
{
872872
isEnabled = Button::isEnabled();
873873

874+
Colour backgroundColour = findColour (ThemeColours::widgetBackground);
875+
874876
if (getToggleState())
875877
{
876-
g.setColour (findColour (ThemeColours::highlightedFill));
877-
}
878-
else
879-
{
880-
g.setColour (findColour (ThemeColours::widgetBackground));
878+
backgroundColour = findColour (ThemeColours::highlightedFill);
881879
}
882880

883-
g.fillPath (outlinePath);
881+
auto baseColour = backgroundColour.withMultipliedSaturation (hasKeyboardFocus (true) ? 1.3f : 1.0f)
882+
.withMultipliedAlpha (isEnabled ? 1.0f : 0.5f);
884883

885-
if (isMouseOver || ! isEnabled)
886-
g.setColour (findColour (ThemeColours::outline).withAlpha (0.4f));
887-
else
888-
g.setColour (findColour (ThemeColours::outline));
884+
if (isButtonDown || isMouseOver)
885+
baseColour = baseColour.contrasting (isButtonDown ? 0.2f : 0.05f);
889886

890-
g.strokePath (outlinePath, PathStrokeType (1.0f));
887+
g.setColour (baseColour);
888+
g.fillPath (outlinePath);
891889

892-
//int stringWidth = font.getStringWidth(getName());
890+
g.setColour (findColour (ThemeColours::outline).withAlpha (isEnabled ? 1.0f : 0.5f));
891+
g.strokePath (outlinePath, PathStrokeType (1.0f));
893892

894893
g.setFont (font);
895894

Source/Processors/PluginManager/PluginManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ int PluginManager::loadPlugin (const String& pluginLoc)
270270
to memory mishaps.
271271
*/
272272
void* handle = 0;
273-
handle = dlopen (processorLocCString, RTLD_GLOBAL | RTLD_NOW);
273+
handle = dlopen (processorLocCString, RTLD_LOCAL | RTLD_NOW);
274274
#endif
275275

276276
if (! handle)

Source/UI/PluginInstaller.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ PluginInstaller::PluginInstaller (bool loadComponents)
8484
if (loadComponents)
8585
{
8686
setSize (910, 480);
87+
88+
if (auto window = getActiveTopLevelWindow())
89+
setCentrePosition (window->getScreenBounds().getCentre());
90+
8791
#ifdef JUCE_WINDOWS
8892
setUsingNativeTitleBar (false);
8993
#else

Source/UI/UIComponent.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1123,7 +1123,6 @@ bool UIComponent::perform (const InvocationInfo& info)
11231123
}
11241124
pluginInstaller->setVisible (true);
11251125
pluginInstaller->toFront (true);
1126-
pluginInstaller->setCentrePosition (this->getScreenBounds().getCentre());
11271126
break;
11281127
}
11291128

0 commit comments

Comments
 (0)