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

Add a base clang-tidy configuration

This commit is contained in:
Tom Poole 2023-09-11 20:49:49 +01:00
parent 0dfaa98e86
commit 9b041f3d74
73 changed files with 484 additions and 279 deletions

View file

@ -34,13 +34,12 @@ public:
explicit MagnifierComponent (Component* c) : content (c)
{
addAndMakeVisible (content.get());
childBoundsChanged (content.get());
updateBounds (content.get());
}
void childBoundsChanged (Component* child)
{
auto childArea = getLocalArea (child, child->getLocalBounds());
setSize (childArea.getWidth(), childArea.getHeight());
updateBounds (child);
}
double getScaleFactor() const { return scaleFactor; }
@ -52,6 +51,12 @@ public:
}
private:
void updateBounds (Component* child)
{
auto childArea = getLocalArea(child, child->getLocalBounds());
setSize (childArea.getWidth(), childArea.getHeight());
}
double scaleFactor = 1.0;
std::unique_ptr<Component> content;
};