diff --git a/widget/src/xlib/nsLookAndFeel.cpp b/widget/src/xlib/nsLookAndFeel.cpp index 5662de08e8ed..38e52c3a06fd 100644 --- a/widget/src/xlib/nsLookAndFeel.cpp +++ b/widget/src/xlib/nsLookAndFeel.cpp @@ -55,6 +55,135 @@ NS_IMETHODIMP nsLookAndFeel::GetColor(const nsColorID aID, nscolor &aColor) res = NS_OK; } + aColor = 0; + switch (aID) { + case eColor_WindowBackground: + aColor = NS_RGB(0xc0, 0xc0, 0xc0); + break; + case eColor_WindowForeground: + aColor = NS_RGB(0x00, 0x00, 0x00); + break; + case eColor_WidgetBackground: + aColor = NS_RGB(0xc0, 0xc0, 0xc0); + break; + case eColor_WidgetForeground: + aColor = NS_RGB(0x00, 0x00, 0x00); + break; + case eColor_WidgetSelectBackground: + aColor = NS_RGB(0x00, 0x00, 0x9c); + break; + case eColor_WidgetSelectForeground: + aColor = NS_RGB(0xff, 0xff, 0xff); + break; + case eColor_Widget3DHighlight: + aColor = NS_RGB(0xa0,0xa0,0xa0); + break; + case eColor_Widget3DShadow: + aColor = NS_RGB(0x40,0x40,0x40); + break; + case eColor_TextBackground: + aColor = NS_RGB(0xff, 0xff, 0xff); + break; + case eColor_TextForeground: + aColor = NS_RGB(0x00, 0x00, 0x00); + break; + case eColor_TextSelectBackground: + aColor = NS_RGB(0x00, 0x00, 0x9c); + break; + case eColor_TextSelectForeground: + aColor = NS_RGB(0xff, 0xff, 0xff); + break; + + // css2 http://www.w3.org/TR/REC-CSS2/ui.html#system-colors + case eColor_activeborder: + aColor = NS_RGB(0x00, 0x00, 0x00); + break; + case eColor_activecaption: + aColor = NS_RGB(0xc0, 0xc0, 0xc0); + break; + case eColor_appworkspace: + aColor = NS_RGB(0xc0, 0xc0, 0xc0); + break; + case eColor_background: + aColor = NS_RGB(0xc0, 0xc0, 0xc0); + break; + + case eColor_captiontext: + aColor = NS_RGB(0x00, 0x00, 0x00); + break; + case eColor_graytext: + aColor = NS_RGB(0x80, 0x80, 0x80); + break; + case eColor_highlight: + aColor = NS_RGB(0x00, 0x00, 0x9c); + break; + case eColor_highlighttext: + aColor = NS_RGB(0xff, 0xff, 0xff); + break; + case eColor_inactiveborder: + aColor = NS_RGB(0xc0, 0xc0, 0xc0); + break; + case eColor_inactivecaption: + aColor = NS_RGB(0x80, 0x80, 0x80); + break; + case eColor_inactivecaptiontext: + aColor = NS_RGB(0xff, 0xff, 0xff); + break; + case eColor_infobackground: + aColor = NS_RGB(0xc0, 0xc0, 0xc0); + break; + case eColor_infotext: + aColor = NS_RGB(0x00, 0x00, 0x00); + break; + case eColor_menu: + aColor = NS_RGB(0xc0, 0xc0, 0xc0); + break; + case eColor_menutext: + aColor = NS_RGB(0x00, 0x00, 0x00); + break; + case eColor_scrollbar: + aColor = NS_RGB(0xc0, 0xc0, 0xc0); + break; + + case eColor_threedface: + case eColor_buttonface: + aColor = NS_RGB(0xc0, 0xc0, 0xc0); + break; + + case eColor_buttonhighlight: // ? + case eColor_threedhighlight: + aColor = NS_RGB(0xa0, 0xa0, 0xa0); + break; + + case eColor_buttontext: + aColor = NS_RGB(0x00, 0x00, 0x00); + break; + + case eColor_buttonshadow: + case eColor_threeddarkshadow: + case eColor_threedshadow: // i think these should be the same + aColor = NS_RGB(0x60, 0x60, 0x60); + break; + + case eColor_threedlightshadow: + aColor = NS_RGB(0xa0, 0xa0, 0xa0); + break; + + case eColor_window: + case eColor_windowframe: + aColor = NS_RGB(0xc0, 0xc0, 0xc0); + break; + + case eColor_windowtext: + aColor = NS_RGB(0x00, 0x00, 0x00); + break; + + default: + /* default color is BLACK */ + aColor = 0; + res = NS_ERROR_FAILURE; + break; + } return NS_OK; }