diff --git a/modules/juce_gui_basics/components/juce_Component.cpp b/modules/juce_gui_basics/components/juce_Component.cpp index 691fbbaead..dab9d6dbc8 100644 --- a/modules/juce_gui_basics/components/juce_Component.cpp +++ b/modules/juce_gui_basics/components/juce_Component.cpp @@ -1370,7 +1370,7 @@ AffineTransform Component::getTransform() const return affineTransform != nullptr ? *affineTransform : AffineTransform(); } -float Component::getApproximateScaleFactorForComponent (Component* targetComponent) +float Component::getApproximateScaleFactorForComponent (const Component* targetComponent) { AffineTransform transform; diff --git a/modules/juce_gui_basics/components/juce_Component.h b/modules/juce_gui_basics/components/juce_Component.h index 711d3d5541..c721a4292f 100644 --- a/modules/juce_gui_basics/components/juce_Component.h +++ b/modules/juce_gui_basics/components/juce_Component.h @@ -615,7 +615,7 @@ public: /** Returns the approximate scale factor for a given component by traversing its parent hierarchy and applying each transform and finally scaling this by the global scale factor. */ - static float JUCE_CALLTYPE getApproximateScaleFactorForComponent (Component* targetComponent); + static float JUCE_CALLTYPE getApproximateScaleFactorForComponent (const Component* targetComponent); //============================================================================== /** Returns a proportion of the component's width.