1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

New class Desktop::Displays, which now handles all display size information and replaces some methods that were in Desktop. Also now supports display scaling values. See Desktop::getDisplays().

This commit is contained in:
jules 2012-04-24 13:24:07 +01:00
parent 10815d9e4d
commit 7d4bbd114a
15 changed files with 282 additions and 205 deletions

View file

@ -538,13 +538,13 @@ bool ResizableWindow::restoreWindowStateFromString (const String& s)
{
Desktop& desktop = Desktop::getInstance();
RectangleList allMonitors (desktop.getAllMonitorDisplayAreas());
RectangleList allMonitors (desktop.getDisplays().getRectangleList (true));
allMonitors.clipTo (newPos);
const Rectangle<int> onScreenArea (allMonitors.getBounds());
if (onScreenArea.getWidth() * onScreenArea.getHeight() < 32 * 32)
{
const Rectangle<int> screen (desktop.getMonitorAreaContaining (newPos.getCentre()));
const Rectangle<int> screen (desktop.getDisplays().getDisplayContaining (newPos.getCentre()).userArea);
newPos.setSize (jmin (newPos.getWidth(), screen.getWidth()),
jmin (newPos.getHeight(), screen.getHeight()));