* Source/NSScreen.m (-userSpaceScaleFactor): Use the DPI

from the display server instead of ignoring it and assuming 72.

The X11 server was changed to always return 72 for now, so there
is no change in behaviour on X.

On Windows we do use the system DPI/scale factor now.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33659 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Eric Wasylishen 2011-07-30 20:44:06 +00:00
parent 59cb20f719
commit 48f0fd951c
2 changed files with 21 additions and 16 deletions

View file

@ -1,3 +1,13 @@
2011-07-30 Eric Wasylishen <ewasylishen@gmail.com>
* Source/NSScreen.m (-userSpaceScaleFactor): Use the DPI
from the display server instead of ignoring it and assuming 72.
The X11 server was changed to always return 72 for now, so there
is no change in behaviour on X.
On Windows we do use the system DPI/scale factor now.
2011-07-25 Riccardo Mottola <rm@gnu.org>
* configure.ac:

View file

@ -421,22 +421,17 @@ static NSMutableArray *screenArray = nil;
}
else
{
return 1.0;
// FIXME: The following is commented out for now because
// it might cause the UI to be scaled unexpectedly.
//GSDisplayServer *srv = GSCurrentServer();
//if (srv != nil)
//{
// NSSize dpi = [GSCurrentServer() resolutionForScreen: _screenNumber];
// // take average for 72dpi
// return (dpi.width + dpi.height) / 144;
//}
//else
//{
// return 1.0;
//}
GSDisplayServer *srv = GSCurrentServer();
if (srv != nil)
{
NSSize dpi = [GSCurrentServer() resolutionForScreen: _screenNumber];
// average the width and height
return (dpi.width + dpi.height) / 144.0;
}
else
{
return 1.0;
}
}
}