clean up comments and includes, part of general effort to clean up native look/feel code. no bug. r=bent

This commit is contained in:
joshmoz%gmail.com 2007-01-16 22:43:05 +00:00
Родитель c25e8e22df
Коммит fe74af7d15
1 изменённых файлов: 6 добавлений и 16 удалений

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

@ -39,14 +39,8 @@
#include "nsIInternetConfigService.h" #include "nsIInternetConfigService.h"
#include "nsIServiceManager.h" #include "nsIServiceManager.h"
#include "nsSize.h" #include "nsSize.h"
#include <ControlDefinitions.h>
#include <MacWindows.h> #import <Carbon/Carbon.h>
//-------------------------------------------------------------------------
//
// Query interface implementation
//
//-------------------------------------------------------------------------
nsLookAndFeel::nsLookAndFeel() : nsXPLookAndFeel() nsLookAndFeel::nsLookAndFeel() : nsXPLookAndFeel()
{ {
@ -168,7 +162,6 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
res = GetMacTextColor(kThemeTextColorMenuItemActive, aColor, NS_RGB(0x00,0x00,0x00)); res = GetMacTextColor(kThemeTextColorMenuItemActive, aColor, NS_RGB(0x00,0x00,0x00));
break; break;
case eColor_infotext: case eColor_infotext:
//this will only work on MacOS 9. Mac OS < 9 will use hardcoded value
res = GetMacTextColor(kThemeTextColorNotification, aColor, NS_RGB(0x00,0x00,0x00)); res = GetMacTextColor(kThemeTextColorNotification, aColor, NS_RGB(0x00,0x00,0x00));
break; break;
case eColor_windowtext: case eColor_windowtext:
@ -182,13 +175,12 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
aColor = NS_RGB(0xCC,0xCC,0xCC); aColor = NS_RGB(0xCC,0xCC,0xCC);
break; break;
case eColor_activeborder: case eColor_activeborder:
//If it means anything at all on Mac OS, then its black in every theme I've tried, // Aqua has no border
//but Aqua *has* no border!
res = GetMacBrushColor(kThemeBrushBlack, aColor, NS_RGB(0x00,0x00,0x00)); res = GetMacBrushColor(kThemeBrushBlack, aColor, NS_RGB(0x00,0x00,0x00));
break; break;
case eColor_appworkspace: case eColor_appworkspace:
// NOTE: this is an MDI color and does not exist on macOS. // NOTE: this is an MDI color and does not exist on Mac OS X.
//used the closest match, which will likely be white. // Use the closest match, which will likely be white.
res = GetMacBrushColor(kThemeBrushDocumentWindowBackground, aColor, NS_RGB(0x63,0x63,0xCE)); res = GetMacBrushColor(kThemeBrushDocumentWindowBackground, aColor, NS_RGB(0x63,0x63,0xCE));
break; break;
case eColor_background: case eColor_background:
@ -252,7 +244,6 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
res = GetMacBrushColor(kThemeBrushDialogBackgroundActive, aColor, NS_RGB(0xDD,0xDD,0xDD)); res = GetMacBrushColor(kThemeBrushDialogBackgroundActive, aColor, NS_RGB(0xDD,0xDD,0xDD));
break; break;
case eColor_infobackground: case eColor_infobackground:
//Brush exists on on MacOS 9. Earlier Mac OS will use default Platinum colour
res = GetMacBrushColor(kThemeBrushNotificationWindowBackground, aColor, NS_RGB(0xFF,0xFF,0xC6)); res = GetMacBrushColor(kThemeBrushNotificationWindowBackground, aColor, NS_RGB(0xFF,0xFF,0xC6));
break; break;
case eColor_windowframe: case eColor_windowframe:
@ -337,8 +328,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
res = GetMacBrushColor(kThemeBrushButtonActiveDarkShadow, aColor, NS_RGB(0x77,0x77,0x77)); res = GetMacBrushColor(kThemeBrushButtonActiveDarkShadow, aColor, NS_RGB(0x77,0x77,0x77));
break; break;
case eColor__moz_mac_alternateprimaryhighlight: case eColor__moz_mac_alternateprimaryhighlight:
// For proper styling of lists when active, on 10.2+ // For proper styling of lists when active
// On older OSs may have to fall back to primary highlight color
nscolor fallbackColor; nscolor fallbackColor;
GetMacBrushColor(kThemeBrushPrimaryHighlightColor, fallbackColor, NS_RGB(0x00,0x00,0x00)); GetMacBrushColor(kThemeBrushPrimaryHighlightColor, fallbackColor, NS_RGB(0x00,0x00,0x00));
res = GetMacBrushColor(kThemeBrushAlternatePrimaryHighlightColor, aColor, fallbackColor); res = GetMacBrushColor(kThemeBrushAlternatePrimaryHighlightColor, aColor, fallbackColor);