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:
parent
a3219c7fc6
commit
c7cbc7dea5
1 changed files with 4 additions and 4 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue