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

Unified Diff: ui/app_list/views/contents_switcher_view.cc

Issue 583843003: views::ImageButton: Added SetMinimumImageSize; removed SetPreferredSize. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Delete usage of SetPreferredSize entirely -- these had no effect. Created 6 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
Index: ui/app_list/views/contents_switcher_view.cc
diff --git a/ui/app_list/views/contents_switcher_view.cc b/ui/app_list/views/contents_switcher_view.cc
index e89ac8fe36378abcd7366f32758868c910d400ce..6aad2e1c17332e1e7c8da000ce8f717ffc4255e7 100644
--- a/ui/app_list/views/contents_switcher_view.cc
+++ b/ui/app_list/views/contents_switcher_view.cc
@@ -16,7 +16,6 @@ namespace app_list {
namespace {
-const int kButtonImageSize = 32;
const int kButtonSpacing = 4;
const int kMinimumHeight = 39;
@@ -49,12 +48,9 @@ ContentsSwitcherView::~ContentsSwitcherView() {}
void ContentsSwitcherView::AddSwitcherButton(int resource_id, int page_index) {
views::ImageButton* button = new views::ImageButton(this);
- button->SetPreferredSize(gfx::Size(kButtonImageSize, kButtonImageSize));
- if (resource_id) {
- button->SetImage(
- views::CustomButton::STATE_NORMAL,
- ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(resource_id));
- }
+ button->SetImage(
+ views::CustomButton::STATE_NORMAL,
+ ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(resource_id));
button->set_tag(page_index);
// Add an indicator for the current launcher page.

Powered by Google App Engine
This is Rietveld 408576698