#5000 "GFX changes required to assume 96 dpi default scaling": enabled the 96 dpi checked in earlier

This commit is contained in:
pierre%netscape.com 1999-04-27 08:20:49 +00:00
Родитель 1421d26db9
Коммит e732383034
3 изменённых файлов: 17 добавлений и 17 удалений

Просмотреть файл

@ -30,7 +30,7 @@
#include <FixMath.h>
const PRUint32 nsDeviceContextMac::kPixelsPerInch = 72;
const PRUint32 nsDeviceContextMac::kPixelsPerInch = 96;
static NS_DEFINE_IID(kDeviceContextIID, NS_IDEVICE_CONTEXT_IID);
@ -72,8 +72,8 @@ double pix_inch;
thegd = ::GetMainDevice();
thepix = (**thegd).gdPMap; // dereferenced handle: don't move memory below!
mDepth = (**thepix).pixelSize;
pix_inch = Fix2X((**thepix).hRes);
mTwipsToPixels = pix_inch/(float)NSIntPointsToTwips(kPixelsPerInch);
pix_inch = kPixelsPerInch; //Fix2X((**thepix).hRes);
mTwipsToPixels = pix_inch/(float)NSIntPointsToTwips(72);
mPixelsToTwips = 1.0f/mTwipsToPixels;
return DeviceContextImpl::Init(aNativeWidget);
@ -148,8 +148,8 @@ NS_IMETHODIMP nsDeviceContextMac :: SupportsNativeWidgets(PRBool &aSupportsWidge
NS_IMETHODIMP nsDeviceContextMac :: GetScrollBarDimensions(float &aWidth, float &aHeight) const
{
// XXX Should we push this to widget library
aWidth = 320.0;
aHeight = 320.0;
aWidth = 16 * mDevUnitsToAppUnits;
aHeight = 16 * mDevUnitsToAppUnits;
return NS_OK;
}
@ -202,10 +202,10 @@ NS_IMETHODIMP nsDeviceContextMac :: GetSystemAttribute(nsSystemAttrID anID, Syst
// Size
//---------
case eSystemAttr_Size_ScrollbarHeight :
aInfo->mSize = 21;
aInfo->mSize = 16; //21;
break;
case eSystemAttr_Size_ScrollbarWidth :
aInfo->mSize = 21;
aInfo->mSize = 16; //21;
break;
case eSystemAttr_Size_WindowTitleHeight:
aInfo->mSize = 0;
@ -345,7 +345,7 @@ THPrint thePrintRecord; // handle to print record
((nsDeviceContextMac*)aContext)->Init(curPort);
((nsDeviceContextMac*)aContext)->mPageRect = (**thePrintRecord).prInfo.rPage;
((nsDeviceContextMac*)aContext)->mTwipsToPixels = pix_Inch/(float)NSIntPointsToTwips(kPixelsPerInch);
((nsDeviceContextMac*)aContext)->mTwipsToPixels = pix_Inch/(float)NSIntPointsToTwips(72);
((nsDeviceContextMac*)aContext)->mPixelsToTwips = 1.0f/mTwipsToPixels;
((nsDeviceContextMac*)aContext)->mAppUnitsToDevUnits = mTwipsToPixels;
((nsDeviceContextMac*)aContext)->mDevUnitsToAppUnits = 1.0f / mAppUnitsToDevUnits;

Просмотреть файл

@ -28,7 +28,7 @@
#include "nsIDeviceContext.h"
#include "nsCRT.h"
#define DONT_USE_FONTS_SMALLER_THAN_9 1 // 1 = 9 pt minimum, 0 = use any font size
#define DONT_USE_FONTS_SMALLER_THAN_9 0 // 1 = 9 pt minimum, 0 = use any font size
class nsFontMetricsMac : public nsIFontMetrics
{

Просмотреть файл

@ -30,7 +30,7 @@
#include <FixMath.h>
const PRUint32 nsDeviceContextMac::kPixelsPerInch = 72;
const PRUint32 nsDeviceContextMac::kPixelsPerInch = 96;
static NS_DEFINE_IID(kDeviceContextIID, NS_IDEVICE_CONTEXT_IID);
@ -72,8 +72,8 @@ double pix_inch;
thegd = ::GetMainDevice();
thepix = (**thegd).gdPMap; // dereferenced handle: don't move memory below!
mDepth = (**thepix).pixelSize;
pix_inch = Fix2X((**thepix).hRes);
mTwipsToPixels = pix_inch/(float)NSIntPointsToTwips(kPixelsPerInch);
pix_inch = kPixelsPerInch; //Fix2X((**thepix).hRes);
mTwipsToPixels = pix_inch/(float)NSIntPointsToTwips(72);
mPixelsToTwips = 1.0f/mTwipsToPixels;
return DeviceContextImpl::Init(aNativeWidget);
@ -148,8 +148,8 @@ NS_IMETHODIMP nsDeviceContextMac :: SupportsNativeWidgets(PRBool &aSupportsWidge
NS_IMETHODIMP nsDeviceContextMac :: GetScrollBarDimensions(float &aWidth, float &aHeight) const
{
// XXX Should we push this to widget library
aWidth = 320.0;
aHeight = 320.0;
aWidth = 16 * mDevUnitsToAppUnits;
aHeight = 16 * mDevUnitsToAppUnits;
return NS_OK;
}
@ -202,10 +202,10 @@ NS_IMETHODIMP nsDeviceContextMac :: GetSystemAttribute(nsSystemAttrID anID, Syst
// Size
//---------
case eSystemAttr_Size_ScrollbarHeight :
aInfo->mSize = 21;
aInfo->mSize = 16; //21;
break;
case eSystemAttr_Size_ScrollbarWidth :
aInfo->mSize = 21;
aInfo->mSize = 16; //21;
break;
case eSystemAttr_Size_WindowTitleHeight:
aInfo->mSize = 0;
@ -345,7 +345,7 @@ THPrint thePrintRecord; // handle to print record
((nsDeviceContextMac*)aContext)->Init(curPort);
((nsDeviceContextMac*)aContext)->mPageRect = (**thePrintRecord).prInfo.rPage;
((nsDeviceContextMac*)aContext)->mTwipsToPixels = pix_Inch/(float)NSIntPointsToTwips(kPixelsPerInch);
((nsDeviceContextMac*)aContext)->mTwipsToPixels = pix_Inch/(float)NSIntPointsToTwips(72);
((nsDeviceContextMac*)aContext)->mPixelsToTwips = 1.0f/mTwipsToPixels;
((nsDeviceContextMac*)aContext)->mAppUnitsToDevUnits = mTwipsToPixels;
((nsDeviceContextMac*)aContext)->mDevUnitsToAppUnits = 1.0f / mAppUnitsToDevUnits;