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

Unified Diff: ui/views/controls/label.cc

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More compile fix for ToT Created 6 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 | « ui/views/controls/label.h ('k') | ui/views/controls/menu/menu_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/label.cc
diff --git a/ui/views/controls/label.cc b/ui/views/controls/label.cc
index 717d2e08a445b2af147a964653f10b86a80f5c81..7028df520c624eed4f967216999fe0dd76fd0d82 100644
--- a/ui/views/controls/label.cc
+++ b/ui/views/controls/label.cc
@@ -218,7 +218,7 @@ int Label::GetBaseline() const {
return GetInsets().top() + font_list_.GetBaseline();
}
-gfx::Size Label::GetPreferredSize() {
+gfx::Size Label::GetPreferredSize() const {
// Return a size of (0, 0) if the label is not visible and if the
// collapse_when_hidden_ flag is set.
// TODO(munjal): This logic probably belongs to the View class. But for now,
@@ -233,7 +233,7 @@ gfx::Size Label::GetPreferredSize() {
return size;
}
-gfx::Size Label::GetMinimumSize() {
+gfx::Size Label::GetMinimumSize() const {
gfx::Size text_size(GetTextSize());
if ((!visible() && collapse_when_hidden_) || text_size.IsEmpty())
return gfx::Size();
@@ -247,7 +247,7 @@ gfx::Size Label::GetMinimumSize() {
return size;
}
-int Label::GetHeightForWidth(int w) {
+int Label::GetHeightForWidth(int w) const {
if (!is_multi_line_)
return View::GetHeightForWidth(w);
« no previous file with comments | « ui/views/controls/label.h ('k') | ui/views/controls/menu/menu_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698