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

Unified Diff: chrome/browser/ui/views/arc_app_dialog_view.cc

Issue 2889623002: Apply View::set_preferred_size in some more places. (Closed)
Patch Set: fix SystemMenuButton 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/tray_constants.cc ('k') | chrome/browser/ui/views/frame/browser_view_layout_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/arc_app_dialog_view.cc
diff --git a/chrome/browser/ui/views/arc_app_dialog_view.cc b/chrome/browser/ui/views/arc_app_dialog_view.cc
index d4e2840716ad87de158f983c0653e6b8fc8b8289..6d4f4e2095a3ff933f09f9fd2ffd5f9828aa778d 100644
--- a/chrome/browser/ui/views/arc_app_dialog_view.cc
+++ b/chrome/browser/ui/views/arc_app_dialog_view.cc
@@ -39,20 +39,6 @@ const int kIconSourceSize = 48;
using ArcAppConfirmCallback =
base::Callback<void(const std::string& app_id, Profile* profile)>;
-// Helper class to hold a smaller icon in a fixed-size view.
-class FixedBoundarySizeImageView : public views::ImageView {
- public:
- FixedBoundarySizeImageView() {}
- ~FixedBoundarySizeImageView() override {}
- // Overriden from View:
- gfx::Size GetPreferredSize() const override {
- return gfx::Size(kIconSize, kIconSize);
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(FixedBoundarySizeImageView);
-};
-
class ArcAppDialogView : public views::DialogDelegateView,
public AppIconLoaderDelegate {
public:
@@ -147,7 +133,8 @@ ArcAppDialogView::ArcAppDialogView(Profile* profile,
provider->GetDistanceMetric(
views::DISTANCE_RELATED_CONTROL_HORIZONTAL)));
- icon_view_ = new FixedBoundarySizeImageView();
+ icon_view_ = new views::ImageView();
+ icon_view_->set_preferred_size(gfx::Size(kIconSize, kIconSize));
AddChildView(icon_view_);
views::View* text_container = new views::View();
« no previous file with comments | « ash/system/tray/tray_constants.cc ('k') | chrome/browser/ui/views/frame/browser_view_layout_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698