remerge with HEAD

git-svn-id: svn://10.0.0.236/branches/GTK2_BRANCH@113298 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
blizzard%redhat.com
2002-01-31 05:50:33 +00:00
parent ab1e3d34d5
commit 612edbfe49
12 changed files with 31 additions and 12 deletions

View File

@@ -114,7 +114,7 @@ static NS_IMETHODIMP nsScriptableRegionConstructor(nsISupports *aOuter, REFNSIID
return rv;
}
static nsModuleComponentInfo components[] =
static const nsModuleComponentInfo components[] =
{
{ "BeOS Font Metrics",
NS_FONT_METRICS_CID,

View File

@@ -125,7 +125,7 @@ static NS_IMETHODIMP nsScriptableRegionConstructor(nsISupports *aOuter, REFNSIID
return rv;
}
static nsModuleComponentInfo components[] =
static const nsModuleComponentInfo components[] =
{
{ "Gtk Font Metrics",
NS_FONT_METRICS_CID,

View File

@@ -99,7 +99,7 @@ nsScriptableRegionConstructor(nsISupports* aOuter, REFNSIID aIID, void** aResult
return result->QueryInterface(aIID, aResult);
}
static nsModuleComponentInfo components[] =
static const nsModuleComponentInfo components[] =
{
{ "nsFontMetrics",
NS_FONT_METRICS_CID,

View File

@@ -815,7 +815,8 @@ nsNativeThemeMac::GetWidgetBorder(nsIDeviceContext* aContext,
case NS_THEME_BUTTON:
if ( OnMacOSX() )
aResult->SizeTo(14,2,14,2); // 14px left/right endcaps in aqua.
aResult->SizeTo(kAquaPushButtonEndcaps, kAquaPushButtonTopBottom,
kAquaPushButtonEndcaps, kAquaPushButtonTopBottom);
else
aResult->SizeTo(5,2,5,2); // 5px for AGA
break;
@@ -826,7 +827,8 @@ nsNativeThemeMac::GetWidgetBorder(nsIDeviceContext* aContext,
case NS_THEME_DROPDOWN:
if ( OnMacOSX() )
aResult->SizeTo(9,2,20,2); // 9px left endcaps in aqua, bigger right border for button
aResult->SizeTo(kAquaDropdownLeftEndcap, kAquaPushButtonTopBottom,
kAquaDropwdonRightEndcap, kAquaPushButtonTopBottom);
else
aResult->SizeTo(3,0,3,0); // 3px for AGA
break;
@@ -867,6 +869,14 @@ nsNativeThemeMac::GetMinimumWidgetSize(nsIRenderingContext* aContext, nsIFrame*
#if TARGET_CARBON
switch ( aWidgetType ) {
case NS_THEME_BUTTON:
{
SInt32 buttonHeight = 0;
::GetThemeMetric(kThemeMetricPushButtonHeight, &buttonHeight);
aResult->SizeTo(kAquaPushButtonEndcaps*2, buttonHeight);
break;
}
case NS_THEME_CHECKBOX:
{
SInt32 boxHeight = 0, boxWidth = 0;

View File

@@ -75,6 +75,15 @@ public:
protected:
// Some widths and margins. You'd think there would be metrics for these, but no.
enum {
kAquaPushButtonEndcaps = 14,
kAquaPushButtonTopBottom = 2,
kAquaDropdownLeftEndcap = 9,
kAquaDropwdonRightEndcap = 20 // wider on right to encompass the button
};
nsresult GetSystemColor(PRUint8 aWidgetType, nsILookAndFeel::nsColorID& aColorID);
nsresult GetSystemFont(PRUint8 aWidgetType, nsSystemFontID& aFont);

View File

@@ -114,7 +114,7 @@ static NS_IMETHODIMP nsScriptableRegionConstructor(nsISupports *aOuter, REFNSIID
return rv;
}
static nsModuleComponentInfo components[] =
static const nsModuleComponentInfo components[] =
{
{ "OS/2 Font Metrics",
NS_FONT_METRICS_CID,

View File

@@ -114,7 +114,7 @@ static nsresult nsScriptableRegionConstructor(nsISupports *aOuter, REFNSIID aIID
return rv;
}
static nsModuleComponentInfo components[] =
static const nsModuleComponentInfo components[] =
{
{ "Ph Font Metrics",
NS_FONT_METRICS_CID,

View File

@@ -46,7 +46,7 @@
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceContextPS)
static nsModuleComponentInfo components[] =
static const nsModuleComponentInfo components[] =
{
{ "GFX Postscript Device Context",
NS_DEVICECONTEXTPS_CID,

View File

@@ -101,7 +101,7 @@ static nsresult nsScriptableRegionConstructor(nsISupports *aOuter,REFNSIID aIID,
return rv;
}
static nsModuleComponentInfo components[] =
static const nsModuleComponentInfo components[] =
{
{ "Qt Font Metrics",
NS_FONT_METRICS_CID,

View File

@@ -143,7 +143,7 @@ nsScriptableRegionConstructor(nsISupports* aOuter, REFNSIID aIID, void** aResult
return rv;
}
static nsModuleComponentInfo components[] =
static const nsModuleComponentInfo components[] =
{
{ "nsFontMetricsWin",
NS_FONT_METRICS_CID,

View File

@@ -113,7 +113,7 @@ static nsresult nsScriptableRegionConstructor(nsISupports *aOuter, REFNSIID aIID
return rv;
}
static nsModuleComponentInfo components[] =
static const nsModuleComponentInfo components[] =
{
{ "Xlib Font Metrics",
NS_FONT_METRICS_CID,

View File

@@ -50,7 +50,7 @@
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceContextXp)
static nsModuleComponentInfo components[] =
static const nsModuleComponentInfo components[] =
{
{ "GFX Xprint Device Context",
NS_DEVICECONTEXTXP_CID,