mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-29 02:40:05 +00:00
macOS: Redraw drop-shadow on repaint for transparent NSWindows to fix some drawing artifacts
This commit is contained in:
parent
72695f91c7
commit
8d3fd92784
1 changed files with 8 additions and 3 deletions
|
|
@ -876,13 +876,18 @@ public:
|
||||||
drawRect (cg, rect, displayScale);
|
drawRect (cg, rect, displayScale);
|
||||||
CGContextRestoreGState (cg);
|
CGContextRestoreGState (cg);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
|
drawRect (cg, r, displayScale);
|
||||||
|
}
|
||||||
|
|
||||||
drawRect (cg, r, displayScale);
|
// transparent NSWindows with a drop-shadow need to redraw their shadow when the content
|
||||||
|
// changes to avoid stale shadows being drawn behind the window
|
||||||
|
if (! isSharedWindow && ! [window isOpaque] && [window hasShadow])
|
||||||
|
[window invalidateShadow];
|
||||||
}
|
}
|
||||||
|
|
||||||
void drawRect (CGContextRef cg, NSRect r, float displayScale)
|
void drawRect (CGContextRef cg, NSRect r, float displayScale)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue