Bug 1045217 - Use gray for tooltips on 10.10. r=mstange, a=lmandel
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Wed, 01 Oct 2014 17:24:58 +0100
changeset 218202 998c8b3e358c379cbe72667a538a11d05f52c532
parent 218201 b23b10f9a6e600a4ad7b87071d469ab3498d99c0
child 218203 50a0fdad852afd3e973b5835e4033b4e8542f547
push id7062
push userryanvm@gmail.com
push dateThu, 09 Oct 2014 02:21:23 +0000
treeherdermozilla-aurora@75ebb70f8b38 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange, lmandel
bugs1045217
milestone34.0a2
Bug 1045217 - Use gray for tooltips on 10.10. r=mstange, a=lmandel
widget/cocoa/nsNativeThemeCocoa.mm
--- a/widget/cocoa/nsNativeThemeCocoa.mm
+++ b/widget/cocoa/nsNativeThemeCocoa.mm
@@ -2375,17 +2375,21 @@ nsNativeThemeCocoa::DrawWidgetBackground
       }
 
       HIThemeMenuItemDrawInfo midi = { 0, kThemeMenuItemPlain, menuState };
       HIThemeDrawMenuSeparator(&macRect, &macRect, &midi, cgContext, HITHEME_ORIENTATION);
     }
       break;
 
     case NS_THEME_TOOLTIP:
-      CGContextSetRGBFillColor(cgContext, 0.996, 1.000, 0.792, 0.950);
+      if (nsCocoaFeatures::OnYosemiteOrLater()) {
+        CGContextSetRGBFillColor(cgContext, 0.945, 0.942, 0.945, 0.950);
+      } else {
+        CGContextSetRGBFillColor(cgContext, 0.996, 1.000, 0.792, 0.950);
+      }
       CGContextFillRect(cgContext, macRect);
       break;
 
     case NS_THEME_CHECKBOX:
     case NS_THEME_RADIO: {
       bool isCheckbox = (aWidgetType == NS_THEME_CHECKBOX);
       DrawCheckboxOrRadio(cgContext, isCheckbox, macRect, GetCheckedOrSelected(aFrame, !isCheckbox),
                           eventState, aFrame);