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

Component: Fix an issue calculating the relative bounds of opaque components

For top level components the relative bounds of a child opaque
component would be wrong unless the top level component was at 0,0
This commit is contained in:
Anthony Nicholls 2025-11-05 08:53:34 +00:00 committed by Anthony Nicholls
parent f257fef7f7
commit cea19a9d12

View file

@ -264,7 +264,7 @@ public:
explicit OpaqueLayer (const Component&& c) = delete;
explicit OpaqueLayer (const Component& c)
{
appendOpaqueChildren (c);
appendOpaqueChildren (c, c.getPosition());
}
enum class ObscuredByKind
@ -360,7 +360,7 @@ public:
}
private:
void appendOpaqueChildren (const Component& parent, Point<int> offset = {})
void appendOpaqueChildren (const Component& parent, Point<int> offset)
{
for (auto* child : parent.getChildren())
{