Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Unified Diff: chrome/browser/ui/cocoa/wrench_menu/menu_tracked_button.mm

Issue 7144007: Improve and unify Mac OS X run-time version checks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/objc_zombie.mm ('k') | content/browser/renderer_host/backing_store_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/wrench_menu/menu_tracked_button.mm
===================================================================
--- chrome/browser/ui/cocoa/wrench_menu/menu_tracked_button.mm (revision 88826)
+++ chrome/browser/ui/cocoa/wrench_menu/menu_tracked_button.mm (working copy)
@@ -1,10 +1,10 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import "chrome/browser/ui/cocoa/wrench_menu/menu_tracked_button.h"
-#include <cmath>
+#include "base/mac/mac_util.h"
@interface MenuTrackedButton (Private)
- (void)doHighlight:(BOOL)highlight;
@@ -104,15 +104,9 @@
}
- (BOOL)shouldHighlightOnHover {
- // Apple does not define NSAppKitVersionNumber10_5 when using the 10.5 SDK.
- // The Internets have come up with this solution.
- #ifndef NSAppKitVersionNumber10_5
- #define NSAppKitVersionNumber10_5 949
- #endif
-
// There's a cell drawing bug in 10.5 that was fixed on 10.6. Hover states
// look terrible due to this, so disable highlighting on 10.5.
- return std::floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_5;
+ return base::mac::IsOSSnowLeopardOrLater();
}
@end
« no previous file with comments | « chrome/browser/ui/cocoa/objc_zombie.mm ('k') | content/browser/renderer_host/backing_store_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698