mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-16 22:04:36 +00:00
Allow theme CSS to distinguish between themed and non-themed in Windows - bug 431666 r=vlad r=dbaron
This commit is contained in:
parent
fd593fb72f
commit
0dccff6dc5
@ -797,6 +797,11 @@ InitSystemMetrics()
|
||||
sSystemMetrics->AppendElement(do_GetAtom("windows-compositor"));
|
||||
}
|
||||
|
||||
rv = lookAndFeel->GetMetric(nsILookAndFeel::eMetric_WindowsClassic, metricResult);
|
||||
if (NS_SUCCEEDED(rv) && metricResult) {
|
||||
sSystemMetrics->AppendElement(do_GetAtom("windows-classic"));
|
||||
}
|
||||
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
|
@ -243,6 +243,15 @@ public:
|
||||
*/
|
||||
eMetric_DWMCompositor,
|
||||
|
||||
/*
|
||||
* A Boolean value to determine whether Windows is themed (Classic vs.
|
||||
* uxtheme)
|
||||
*
|
||||
* This is Windows-specific and is not implemented on other platforms
|
||||
* (will return the default of NS_ERROR_FAILURE).
|
||||
*/
|
||||
eMetric_WindowsClassic,
|
||||
|
||||
/*
|
||||
* eMetric_AlertNotificationOrigin indicates from which corner of the
|
||||
* screen alerts slide in, and from which direction (horizontal/vertical).
|
||||
|
@ -422,6 +422,7 @@ NS_IMETHODIMP nsLookAndFeel::GetMetric(const nsMetricID aID, PRInt32 & aMetric)
|
||||
aMetric = 3;
|
||||
break;
|
||||
case eMetric_DWMCompositor:
|
||||
case eMetric_WindowsClassic:
|
||||
case eMetric_WindowsDefaultTheme:
|
||||
aMetric = 0;
|
||||
res = NS_ERROR_NOT_IMPLEMENTED;
|
||||
|
@ -601,6 +601,7 @@ NS_IMETHODIMP nsLookAndFeel::GetMetric(const nsMetricID aID, PRInt32 & aMetric)
|
||||
aMetric = 3;
|
||||
break;
|
||||
case eMetric_DWMCompositor:
|
||||
case eMetric_WindowsClassic:
|
||||
case eMetric_WindowsDefaultTheme:
|
||||
aMetric = 0;
|
||||
res = NS_ERROR_NOT_IMPLEMENTED;
|
||||
|
@ -555,6 +555,7 @@ NS_IMETHODIMP nsLookAndFeel::GetMetric(const nsMetricID aID, PRInt32 & aMetric)
|
||||
aMetric = 3;
|
||||
break;
|
||||
case eMetric_DWMCompositor:
|
||||
case eMetric_WindowsClassic:
|
||||
case eMetric_WindowsDefaultTheme:
|
||||
aMetric = 0;
|
||||
res = NS_ERROR_NOT_IMPLEMENTED;
|
||||
|
@ -367,6 +367,7 @@ NS_IMETHODIMP nsLookAndFeel::GetMetric(const nsMetricID aID, PRInt32 & aMetric)
|
||||
aMetric = 3;
|
||||
break;
|
||||
case eMetric_DWMCompositor:
|
||||
case eMetric_WindowsClassic:
|
||||
case eMetric_WindowsDefaultTheme:
|
||||
aMetric = 0;
|
||||
res = NS_ERROR_NOT_IMPLEMENTED;
|
||||
|
@ -364,6 +364,7 @@ NS_IMETHODIMP nsLookAndFeel::GetMetric(const nsMetricID aID, PRInt32 & aMetric)
|
||||
aMetric = 3;
|
||||
break;
|
||||
case eMetric_DWMCompositor:
|
||||
case eMetric_WindowsClassic:
|
||||
case eMetric_WindowsDefaultTheme:
|
||||
aMetric = 0;
|
||||
res = NS_ERROR_NOT_IMPLEMENTED;
|
||||
|
@ -480,6 +480,9 @@ NS_IMETHODIMP nsLookAndFeel::GetMetric(const nsMetricID aID, PRInt32 & aMetric)
|
||||
case eMetric_TreeScrollLinesMax:
|
||||
aMetric = 3;
|
||||
break;
|
||||
case eMetric_WindowsClassic:
|
||||
aMetric = !nsUXThemeData::IsAppThemed();
|
||||
break;
|
||||
case eMetric_WindowsDefaultTheme:
|
||||
aMetric = 0;
|
||||
#ifndef WINCE
|
||||
|
Loading…
x
Reference in New Issue
Block a user