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

Unified Diff: chrome/browser/ui/cocoa/tabs/tab_controller.mm

Issue 7969017: [Mac] Do not draw pinned tab favicons on half pixels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/tabs/tab_controller.mm
diff --git a/chrome/browser/ui/cocoa/tabs/tab_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_controller.mm
index d18a774768dd6ad9d34801673326b2a4ece06c6c..0c21f5ff3f137cae1231055fa0504f616770dc48 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_controller.mm
@@ -2,10 +2,13 @@
// 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/tabs/tab_controller.h"
+
+#include <cmath>
+
#include "base/mac/mac_util.h"
#import "chrome/browser/themes/theme_service.h"
#import "chrome/browser/ui/cocoa/menu_controller.h"
-#import "chrome/browser/ui/cocoa/tabs/tab_controller.h"
#import "chrome/browser/ui/cocoa/tabs/tab_controller_target.h"
#import "chrome/browser/ui/cocoa/tabs/tab_view.h"
#import "chrome/browser/ui/cocoa/themed_window.h"
@@ -193,7 +196,8 @@ class MenuDelegate : public ui::SimpleMenuModel::Delegate {
: [TabController miniTabWidth];
// Center the icon.
- appIconFrame.origin.x = (tabWidth - NSWidth(appIconFrame)) / 2.0;
+ appIconFrame.origin.x =
+ std::floor((tabWidth - NSWidth(appIconFrame)) / 2.0);
[iconView_ setFrame:appIconFrame];
} else {
[iconView_ setFrame:originalIconFrame_];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698