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

Unified Diff: ash/system/tray/tray_popup_utils.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/system_menu_button.cc ('k') | ash/system/tray_tracing.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/tray_popup_utils.cc
diff --git a/ash/system/tray/tray_popup_utils.cc b/ash/system/tray/tray_popup_utils.cc
index 41b5fa5d6bc3e3d6f12d8ce76cc9d23e3fc65091..17be4b89dacbf82aac4c15438a53d8e17fdffdef 100644
--- a/ash/system/tray/tray_popup_utils.cc
+++ b/ash/system/tray/tray_popup_utils.cc
@@ -12,7 +12,6 @@
#include "ash/resources/vector_icons/vector_icons.h"
#include "ash/session/session_controller.h"
#include "ash/shell.h"
-#include "ash/system/tray/fixed_sized_image_view.h"
#include "ash/system/tray/hover_highlight_view.h"
#include "ash/system/tray/size_range_layout.h"
#include "ash/system/tray/tray_constants.h"
@@ -234,13 +233,15 @@ views::Label* TrayPopupUtils::CreateDefaultLabel() {
}
views::ImageView* TrayPopupUtils::CreateMainImageView() {
- return new FixedSizedImageView(kTrayPopupItemMinStartWidth,
- kTrayPopupItemMinHeight);
+ auto* image = new views::ImageView;
+ image->set_preferred_size(
+ gfx::Size(kTrayPopupItemMinStartWidth, kTrayPopupItemMinHeight));
+ return image;
}
views::ImageView* TrayPopupUtils::CreateMoreImageView() {
- views::ImageView* image =
- new FixedSizedImageView(kMenuIconSize, kMenuIconSize);
+ auto* image = new views::ImageView;
+ image->set_preferred_size(gfx::Size(gfx::Size(kMenuIconSize, kMenuIconSize)));
image->EnableCanvasFlippingForRTLUI(true);
image->SetImage(
gfx::CreateVectorIcon(kSystemMenuArrowRightIcon, kMenuIconColor));
« no previous file with comments | « ash/system/tray/system_menu_button.cc ('k') | ash/system/tray_tracing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698