Browse Source

Component: Make getApproximateScaleFactorForComponent take a const argument

pull/22/head
Tom Poole 3 years ago
parent
commit
9ccfea9001
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      modules/juce_gui_basics/components/juce_Component.cpp
  2. +1
    -1
      modules/juce_gui_basics/components/juce_Component.h

+ 1
- 1
modules/juce_gui_basics/components/juce_Component.cpp View File

@@ -1370,7 +1370,7 @@ AffineTransform Component::getTransform() const
return affineTransform != nullptr ? *affineTransform : AffineTransform(); return affineTransform != nullptr ? *affineTransform : AffineTransform();
} }
float Component::getApproximateScaleFactorForComponent (Component* targetComponent)
float Component::getApproximateScaleFactorForComponent (const Component* targetComponent)
{ {
AffineTransform transform; AffineTransform transform;


+ 1
- 1
modules/juce_gui_basics/components/juce_Component.h View File

@@ -615,7 +615,7 @@ public:
/** Returns the approximate scale factor for a given component by traversing its parent hierarchy /** 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. 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. /** Returns a proportion of the component's width.


Loading…
Cancel
Save