Updated nsLookAndFeel - modified couple colors, added few *_moz_* colors
authorpekka.vanhoja
Sat, 19 Apr 2008 19:09:56 +0300
changeset 16877 a5b240ece926711dfb352aaa4b6b62f179980d38
parent 16876 29cfa6ba3abc3f52da66722013713c8791df5465
child 16878 cdff7aca71ea39c2287d4a39c8ea26a5771006a9
push id1298
push userpavlov@mozilla.com
push dateSun, 17 Aug 2008 05:03:09 +0000
treeherderautoland@4a506fa751d8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone2.0a1pre
Updated nsLookAndFeel - modified couple colors, added few *_moz_* colors
widget/src/qt/nsLookAndFeel.cpp
--- a/widget/src/qt/nsLookAndFeel.cpp
+++ b/widget/src/qt/nsLookAndFeel.cpp
@@ -102,17 +102,17 @@ nsresult nsLookAndFeel::NativeGetColor(c
       aColor = NS_RGB(0x40,0x40,0x40);
       break;
 
     case eColor_TextBackground:
       aColor = QCOLOR_TO_NS_RGB(palette.color(QPalette::Normal, QPalette::Window));
       break;
 
     case eColor_TextForeground:
-      aColor = QCOLOR_TO_NS_RGB(palette.color(QPalette::Normal, QPalette::Text));
+      aColor = QCOLOR_TO_NS_RGB(palette.color(QPalette::Normal, QPalette::WindowText));
       break;
 
     case eColor_TextSelectBackground:
     case eColor_IMESelectedRawTextBackground:
     case eColor_IMESelectedConvertedTextBackground:
       aColor = QCOLOR_TO_NS_RGB(palette.color(QPalette::Normal, QPalette::Highlight));
       break;
 
@@ -247,50 +247,54 @@ nsresult nsLookAndFeel::NativeGetColor(c
       break;
 
     case eColor_windowtext:
       aColor = QCOLOR_TO_NS_RGB(palette.color(QPalette::Normal, QPalette::Text));
       break;
 
      // from the CSS3 working draft (not yet finalized)
      // http://www.w3.org/tr/2000/wd-css3-userint-20000216.html#color
-     case eColor__moz_field:
-       aColor = QCOLOR_TO_NS_RGB(palette.color(QPalette::Normal, QPalette::Base));
-       break;
+
+    case eColor__moz_buttondefault:
+      aColor = QCOLOR_TO_NS_RGB(palette.color(QPalette::Normal, QPalette::Button));
+      break;
 
-     case eColor__moz_fieldtext:
-       aColor = QCOLOR_TO_NS_RGB(palette.color(QPalette::Normal, QPalette::Text));
-       break;
+    case eColor__moz_field:
+      aColor = QCOLOR_TO_NS_RGB(palette.color(QPalette::Normal, QPalette::Base));
+      break;
 
-     case eColor__moz_dialog:
-       aColor = QCOLOR_TO_NS_RGB(palette.color(QPalette::Normal, QPalette::Window));
-       break;
+    case eColor__moz_fieldtext:
+      aColor = QCOLOR_TO_NS_RGB(palette.color(QPalette::Normal, QPalette::Text));
+      break;
 
-     case eColor__moz_dialogtext:
-       aColor = QCOLOR_TO_NS_RGB(palette.color(QPalette::Normal, QPalette::WindowText));
-       break;
+    case eColor__moz_dialog:
+      aColor = QCOLOR_TO_NS_RGB(palette.color(QPalette::Normal, QPalette::Window));
+      break;
+
+    case eColor__moz_dialogtext:
+      aColor = QCOLOR_TO_NS_RGB(palette.color(QPalette::Normal, QPalette::WindowText));
+      break;
 
-     case eColor__moz_dragtargetzone:
-       aColor = QCOLOR_TO_NS_RGB(palette.color(QPalette::Normal, QPalette::Window));
-       break;
+    case eColor__moz_dragtargetzone:
+      aColor = QCOLOR_TO_NS_RGB(palette.color(QPalette::Normal, QPalette::Window));
+      break;
 
-     case eColor__moz_buttonhovertext:
-       aColor = QCOLOR_TO_NS_RGB(palette.color(QPalette::Normal, QPalette::ButtonText));
-       break;
+    case eColor__moz_buttonhovertext:
+      aColor = QCOLOR_TO_NS_RGB(palette.color(QPalette::Normal, QPalette::ButtonText));
+      break;
 
     case eColor__moz_menuhovertext:
     case eColor__moz_menubarhovertext:
-       aColor = QCOLOR_TO_NS_RGB(palette.color(QPalette::Normal, QPalette::Text));
-       break;
-
+      aColor = QCOLOR_TO_NS_RGB(palette.color(QPalette::Normal, QPalette::Text));
+      break;
 
-     default:
-       aColor = 0;
-       res    = NS_ERROR_FAILURE;
-       break;
+    default:
+      aColor = 0;
+      res    = NS_ERROR_FAILURE;
+      break;
   }
   return res;
 }
 
 #ifdef NS_LOOKANDFEEL_DEBUG
 static const char *metricToString[] = {
     "eMetric_WindowTitleHeight",
     "eMetric_WindowBorderWidth",