1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-14 00:14:18 +00:00

Fixed some deprecation warnings in the NetworkGraphicsDemo

This commit is contained in:
ed 2018-08-22 09:14:19 +01:00
parent a3219c7fc6
commit c7cbc7dea5

View file

@ -126,8 +126,8 @@ private:
//==============================================================================
String getMachineInfoToDisplay() const
{
//auto display = Desktop::getInstance().getDisplays().getDisplayContaining (getScreenBounds().getCentre());
return getOSName();// + " " + String (display.dpi) + " " + String (display.scale);
auto display = Desktop::getInstance().getDisplays().findDisplayForPoint (getScreenBounds().getCentre());
return getOSName() + " " + String (display.dpi) + " " + String (display.scale);
}
static String getOSName()
@ -181,7 +181,7 @@ private:
if (auto client = canvas.findClient (clientName))
{
auto screenBounds = getScreenBounds();
auto display = Desktop::getInstance().getDisplays().getDisplayContaining (screenBounds.getCentre());
auto display = Desktop::getInstance().getDisplays().findDisplayForPoint (screenBounds.getCentre());
return ((screenBounds - display.userArea.getCentre()).toFloat() / (client->scaleFactor * display.dpi / display.scale)) + client->centre;
}
@ -192,7 +192,7 @@ private:
{
if (auto client = canvas.findClient (clientName))
{
auto display = Desktop::getInstance().getDisplays().getDisplayContaining (getScreenBounds().getCentre());
auto display = Desktop::getInstance().getDisplays().findDisplayForPoint (getScreenBounds().getCentre());
return (display.userArea.toFloat() / (client->scaleFactor * display.dpi / display.scale)).withCentre (client->centre);
}