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

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

Issue 1228213003: Just set borders once when creating a views::LabelButton (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self review Created 5 years, 5 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
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 00d9a7abe8cc115eda6fb335dabd5dc134df0b08..c2e2985776833bd48f35b0379ec367bf1e4ef9cc 100644
--- a/chrome/browser/ui/views/toolbar/wrench_menu.cc
+++ b/chrome/browser/ui/views/toolbar/wrench_menu.cc
@@ -268,8 +268,8 @@ class InMenuButton : public LabelButton {
in_menu_background_ = new InMenuButtonBackground(type);
set_background(in_menu_background_);
-
- OnNativeThemeChanged(NULL);
+ SetBorder(views::Border::CreateEmptyBorder(0, kHorizontalPadding, 0,
+ kHorizontalPadding));
}
void SetOtherButtons(const InMenuButton* left, const InMenuButton* right) {
@@ -279,8 +279,6 @@ class InMenuButton : public LabelButton {
// views::LabelButton
void OnNativeThemeChanged(const ui::NativeTheme* theme) override {
const MenuConfig& menu_config = MenuConfig::instance(theme);
- SetBorder(views::Border::CreateEmptyBorder(
- 0, kHorizontalPadding, 0, kHorizontalPadding));
SetFontList(menu_config.font_list);
if (theme) {

Powered by Google App Engine
This is Rietveld 408576698