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

Unified Diff: ash/system/user/user_card_view.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/update/tray_update.cc ('k') | chrome/browser/ui/views/profiles/profile_chooser_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/user/user_card_view.cc
diff --git a/ash/system/user/user_card_view.cc b/ash/system/user/user_card_view.cc
index 2844cd8c322c8c67fb5c09ef5605e10330e19f50..7460337662cfee343c67733b63b7fa1015e2685a 100644
--- a/ash/system/user/user_card_view.cc
+++ b/ash/system/user/user_card_view.cc
@@ -97,7 +97,7 @@ class PublicAccountUserDetails : public views::View,
// Calculate a preferred size that ensures the label text and the following
// link do not wrap over more than three lines in total for aesthetic reasons
// if possible.
- void CalculatePreferredSize();
+ void DeterminePreferredSize();
base::string16 text_;
views::Link* learn_more_;
@@ -136,7 +136,7 @@ PublicAccountUserDetails::PublicAccountUserDetails() : learn_more_(nullptr) {
learn_more_->set_listener(this);
AddChildView(learn_more_);
- CalculatePreferredSize();
+ DeterminePreferredSize();
}
PublicAccountUserDetails::~PublicAccountUserDetails() {}
@@ -231,7 +231,7 @@ void PublicAccountUserDetails::LinkClicked(views::Link* source,
Shell::Get()->system_tray_controller()->ShowPublicAccountInfo();
}
-void PublicAccountUserDetails::CalculatePreferredSize() {
+void PublicAccountUserDetails::DeterminePreferredSize() {
const gfx::FontList font_list;
const gfx::Size link_size = learn_more_->GetPreferredSize();
const int space_width =
« no previous file with comments | « ash/system/update/tray_update.cc ('k') | chrome/browser/ui/views/profiles/profile_chooser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698