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

Unified Diff: chrome/browser/ui/views/toolbar/wrench_menu.cc

Issue 185233017: Removes extra left border from wrench menu buttons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removes extra left border from wrench menu buttons (nits) Created 6 years, 10 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/views/toolbar/wrench_menu.cc
diff --git a/chrome/browser/ui/views/toolbar/wrench_menu.cc b/chrome/browser/ui/views/toolbar/wrench_menu.cc
index a4ce9f54131065945785ea5d49554b64a62a04d9..2b133f9244a9ea9243730f97441f99412a71ba27 100644
--- a/chrome/browser/ui/views/toolbar/wrench_menu.cc
+++ b/chrome/browser/ui/views/toolbar/wrench_menu.cc
@@ -57,10 +57,6 @@
#include "ui/views/controls/menu/submenu_view.h"
#include "ui/views/widget/widget.h"
-#if defined(USE_AURA)
-#include "ui/native_theme/native_theme_aura.h"
-#endif
-
using base::UserMetricsAction;
using content::HostZoomMap;
using content::WebContents;
@@ -187,23 +183,19 @@ class MenuButtonBackground : public views::Background {
button ? button->state() : views::Button::STATE_NORMAL;
int w = view->width();
int h = view->height();
-#if defined(USE_AURA)
- // Normal buttons get a border drawn on the right side and the rest gets
- // filled in. The left button however does not get a line to combine
- // buttons.
- int border = 0;
- if (type_ != RIGHT_BUTTON) {
- border = 1;
- canvas->FillRect(gfx::Rect(0, 0, border, h),
- BorderColor(view, views::Button::STATE_NORMAL));
- }
if (use_new_menu_) {
+ // Normal buttons get a border drawn on the right side and the rest gets
+ // filled in. The left button however does not get a line to combine
+ // buttons.
+ if (type_ != RIGHT_BUTTON) {
+ canvas->FillRect(gfx::Rect(0, 0, 1, h),
+ BorderColor(view, views::Button::STATE_NORMAL));
+ }
gfx::Rect bounds(view->GetLocalBounds());
bounds.set_x(view->GetMirroredXForRect(bounds));
DrawBackground(canvas, view, bounds, state);
return;
}
-#endif
const SkColor border_color = BorderColor(view, state);
switch (TypeAdjustedForRTL()) {
// TODO(pkasting): Why don't all the following use SkPaths with rounded
« 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