зеркало из https://github.com/mozilla/gecko-dev.git
Bug 448767 - Add -moz-system-metric(mac-graphite-theme), r=vlad sr=dbaron
This commit is contained in:
Родитель
b83d7c6b4e
Коммит
7d14ac6764
|
@ -792,6 +792,11 @@ InitSystemMetrics()
|
|||
sSystemMetrics->AppendElement(do_GetAtom("windows-default-theme"));
|
||||
}
|
||||
|
||||
rv = lookAndFeel->GetMetric(nsILookAndFeel::eMetric_MacGraphiteTheme, metricResult);
|
||||
if (NS_SUCCEEDED(rv) && metricResult) {
|
||||
sSystemMetrics->AppendElement(do_GetAtom("mac-graphite-theme"));
|
||||
}
|
||||
|
||||
rv = lookAndFeel->GetMetric(nsILookAndFeel::eMetric_DWMCompositor, metricResult);
|
||||
if (NS_SUCCEEDED(rv) && metricResult) {
|
||||
sSystemMetrics->AppendElement(do_GetAtom("windows-compositor"));
|
||||
|
|
|
@ -255,6 +255,15 @@ public:
|
|||
*/
|
||||
eMetric_WindowsClassic,
|
||||
|
||||
/*
|
||||
* A Boolean value to determine whether the Mac graphite theme is
|
||||
* being used.
|
||||
*
|
||||
* The value of this metric is not used on other platforms. These platforms
|
||||
* should return NS_ERROR_NOT_IMPLEMENTED when queried for this metric.
|
||||
*/
|
||||
eMetric_MacGraphiteTheme,
|
||||
|
||||
/*
|
||||
* eMetric_AlertNotificationOrigin indicates from which corner of the
|
||||
* screen alerts slide in, and from which direction (horizontal/vertical).
|
||||
|
|
|
@ -427,6 +427,10 @@ NS_IMETHODIMP nsLookAndFeel::GetMetric(const nsMetricID aID, PRInt32 & aMetric)
|
|||
aMetric = 0;
|
||||
res = NS_ERROR_NOT_IMPLEMENTED;
|
||||
break;
|
||||
case eMetric_MacGraphiteTheme:
|
||||
aMetric = 0;
|
||||
res = NS_ERROR_NOT_IMPLEMENTED;
|
||||
break;
|
||||
case eMetric_IMERawInputUnderlineStyle:
|
||||
case eMetric_IMEConvertedTextUnderlineStyle:
|
||||
aMetric = NS_UNDERLINE_STYLE_SOLID;
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include "nsNativeThemeColors.h"
|
||||
|
||||
#import <Carbon/Carbon.h>
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
nsLookAndFeel::nsLookAndFeel() : nsXPLookAndFeel()
|
||||
{
|
||||
|
@ -613,6 +614,9 @@ NS_IMETHODIMP nsLookAndFeel::GetMetric(const nsMetricID aID, PRInt32 & aMetric)
|
|||
aMetric = 0;
|
||||
res = NS_ERROR_NOT_IMPLEMENTED;
|
||||
break;
|
||||
case eMetric_MacGraphiteTheme:
|
||||
aMetric = [NSColor currentControlTint] == NSGraphiteControlTint;
|
||||
break;
|
||||
case eMetric_TabFocusModel:
|
||||
{
|
||||
// we should probably cache this
|
||||
|
|
|
@ -560,6 +560,10 @@ NS_IMETHODIMP nsLookAndFeel::GetMetric(const nsMetricID aID, PRInt32 & aMetric)
|
|||
aMetric = 0;
|
||||
res = NS_ERROR_NOT_IMPLEMENTED;
|
||||
break;
|
||||
case eMetric_MacGraphiteTheme:
|
||||
aMetric = 0;
|
||||
res = NS_ERROR_NOT_IMPLEMENTED;
|
||||
break;
|
||||
case eMetric_IMERawInputUnderlineStyle:
|
||||
case eMetric_IMEConvertedTextUnderlineStyle:
|
||||
aMetric = NS_UNDERLINE_STYLE_SOLID;
|
||||
|
|
|
@ -375,6 +375,10 @@ NS_IMETHODIMP nsLookAndFeel::GetMetric(const nsMetricID aID, PRInt32 & aMetric)
|
|||
aMetric = 0;
|
||||
res = NS_ERROR_NOT_IMPLEMENTED;
|
||||
break;
|
||||
case eMetric_MacGraphiteTheme:
|
||||
aMetric = 0;
|
||||
res = NS_ERROR_NOT_IMPLEMENTED;
|
||||
break;
|
||||
case eMetric_IMERawInputUnderlineStyle:
|
||||
case eMetric_IMEConvertedTextUnderlineStyle:
|
||||
aMetric = NS_UNDERLINE_STYLE_SOLID;
|
||||
|
|
|
@ -369,6 +369,10 @@ NS_IMETHODIMP nsLookAndFeel::GetMetric(const nsMetricID aID, PRInt32 & aMetric)
|
|||
aMetric = 0;
|
||||
res = NS_ERROR_NOT_IMPLEMENTED;
|
||||
break;
|
||||
case eMetric_MacGraphiteTheme:
|
||||
aMetric = 0;
|
||||
res = NS_ERROR_NOT_IMPLEMENTED;
|
||||
break;
|
||||
case eMetric_IMERawInputUnderlineStyle:
|
||||
case eMetric_IMEConvertedTextUnderlineStyle:
|
||||
aMetric = NS_UNDERLINE_STYLE_SOLID;
|
||||
|
|
|
@ -522,6 +522,10 @@ NS_IMETHODIMP nsLookAndFeel::GetMetric(const nsMetricID aID, PRInt32 & aMetric)
|
|||
res = NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
break;
|
||||
case eMetric_MacGraphiteTheme:
|
||||
aMetric = 0;
|
||||
res = NS_ERROR_NOT_IMPLEMENTED;
|
||||
break;
|
||||
#ifndef WINCE
|
||||
case eMetric_DWMCompositor:
|
||||
aMetric = nsUXThemeData::sHaveCompositor;
|
||||
|
|
Загрузка…
Ссылка в новой задаче