mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
AlertWindow: Scale window according to scale of associatedComponent
For DialogWindow, uses the scale of componentToCentreAround. This allows drawing dialog windows at the expected scale in plugins. An associated component must be supplied in order for this to work.
This commit is contained in:
parent
7b6d41be3f
commit
0f6f2728f2
5 changed files with 26 additions and 10 deletions
|
|
@ -291,7 +291,7 @@ void TopLevelWindow::centreAroundComponent (Component* c, const int width, const
|
|||
}
|
||||
else
|
||||
{
|
||||
auto targetCentre = c->localPointToGlobal (c->getLocalBounds().getCentre());
|
||||
auto targetCentre = c->localPointToGlobal (c->getLocalBounds().getCentre()) / getDesktopScaleFactor();
|
||||
auto parentArea = c->getParentMonitorArea();
|
||||
|
||||
if (auto* parent = getParentComponent())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue