mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +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:
parent
f257fef7f7
commit
cea19a9d12
1 changed files with 2 additions and 2 deletions
|
|
@ -264,7 +264,7 @@ public:
|
||||||
explicit OpaqueLayer (const Component&& c) = delete;
|
explicit OpaqueLayer (const Component&& c) = delete;
|
||||||
explicit OpaqueLayer (const Component& c)
|
explicit OpaqueLayer (const Component& c)
|
||||||
{
|
{
|
||||||
appendOpaqueChildren (c);
|
appendOpaqueChildren (c, c.getPosition());
|
||||||
}
|
}
|
||||||
|
|
||||||
enum class ObscuredByKind
|
enum class ObscuredByKind
|
||||||
|
|
@ -360,7 +360,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void appendOpaqueChildren (const Component& parent, Point<int> offset = {})
|
void appendOpaqueChildren (const Component& parent, Point<int> offset)
|
||||||
{
|
{
|
||||||
for (auto* child : parent.getChildren())
|
for (auto* child : parent.getChildren())
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue