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

Unified Diff: chrome/browser/ui/cocoa/download/download_show_all_button.mm

Issue 240093006: CoreAnimation: Fix text anti-aliasing in download shelf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_omnibox_aa
Patch Set: Fix typo Created 6 years, 8 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/download/download_item_button.mm ('k') | chrome/browser/ui/cocoa/view_id_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/download/download_show_all_button.mm
diff --git a/chrome/browser/ui/cocoa/download/download_show_all_button.mm b/chrome/browser/ui/cocoa/download/download_show_all_button.mm
index 81b635405d5a9e0b48a198cc29f67b7b373a679a..196a7ff4035f51ce55f51c327d2beb65b23aab81 100644
--- a/chrome/browser/ui/cocoa/download/download_show_all_button.mm
+++ b/chrome/browser/ui/cocoa/download/download_show_all_button.mm
@@ -6,6 +6,8 @@
#include "base/logging.h"
#import "chrome/browser/ui/cocoa/download/download_show_all_cell.h"
+#import "chrome/browser/ui/cocoa/nsview_additions.h"
+#import "chrome/browser/ui/cocoa/view_id_util.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "ui/base/resource/resource_bundle.h"
@@ -35,4 +37,16 @@
[self setFrame:newRect];
}
+- (BOOL)isOpaque {
+ // Make this control opaque so that sub-pixel anti-aliasing works when
+ // CoreAnimation is enabled.
+ return YES;
+}
+
+- (void)drawRect:(NSRect)rect {
+ NSView* downloadShelfView = [self ancestorWithViewID:VIEW_ID_DOWNLOAD_SHELF];
+ [self cr_drawUsingAncestor:downloadShelfView inRect:rect];
+ [super drawRect:rect];
+}
+
@end
« no previous file with comments | « chrome/browser/ui/cocoa/download/download_item_button.mm ('k') | chrome/browser/ui/cocoa/view_id_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698