Browse Source

Fixed some deprecation warnings in the NetworkGraphicsDemo

tags/2021-05-28
ed 7 years ago
parent
commit
c7cbc7dea5
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      extras/NetworkGraphicsDemo/Source/SlaveComponent.h

+ 4
- 4
extras/NetworkGraphicsDemo/Source/SlaveComponent.h 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);
}


Loading…
Cancel
Save