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

Unified Diff: ash/system/tray/system_menu_button.cc

Issue 2881183003: Add views::View::set_preferred_size, use it in a few places. (Closed)
Patch Set: auto* Created 3 years, 7 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 | « ash/system/tray/fixed_sized_image_view.cc ('k') | ash/system/tray/tray_popup_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/system_menu_button.cc
diff --git a/ash/system/tray/system_menu_button.cc b/ash/system/tray/system_menu_button.cc
index 8afd07b18853ff25e4353176e6e13574cc797df9..9700fb3b0ae6757a4f012740d3499eb5cf6c8b85 100644
--- a/ash/system/tray/system_menu_button.cc
+++ b/ash/system/tray/system_menu_button.cc
@@ -15,7 +15,6 @@
#include "ui/views/animation/ink_drop_impl.h"
#include "ui/views/animation/ink_drop_mask.h"
#include "ui/views/animation/square_ink_drop_ripple.h"
-#include "ui/views/border.h"
#include "ui/views/painter.h"
namespace ash {
@@ -32,10 +31,7 @@ SystemMenuButton::SystemMenuButton(views::ButtonListener* listener,
SetImage(views::Button::STATE_NORMAL, &normal_icon);
SetImage(views::Button::STATE_DISABLED, &disabled_icon);
- const int horizontal_padding = (kMenuButtonSize - normal_icon.width()) / 2;
- const int vertical_padding = (kMenuButtonSize - normal_icon.height()) / 2;
- SetBorder(views::CreateEmptyBorder(vertical_padding, horizontal_padding,
- vertical_padding, horizontal_padding));
+ set_preferred_size(gfx::Size(kMenuButtonSize, kMenuButtonSize));
SetTooltipText(l10n_util::GetStringUTF16(accessible_name_id));
« no previous file with comments | « ash/system/tray/fixed_sized_image_view.cc ('k') | ash/system/tray/tray_popup_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698