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

Unified Diff: views/controls/label.cc

Issue 338001: Get the About panel to align its links correctly, (Closed)
Patch Set: Found some leftover cruft in files. Created 11 years, 2 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: views/controls/label.cc
diff --git a/views/controls/label.cc b/views/controls/label.cc
old mode 100644
new mode 100755
index 6da6c48e2cfb6f30b830c83632dabbf9b865d0fc..6b17338150600b0787614771dbdaa3c6e0c74b09
--- a/views/controls/label.cc
+++ b/views/controls/label.cc
@@ -264,7 +264,12 @@ const GURL Label::GetURL() const {
gfx::Size Label::GetTextSize() {
if (!text_size_valid_) {
- text_size_.SetSize(font_.GetStringWidth(text_), font_.height());
+ int w = 0, h = 0;
Evan Stade 2009/10/23 18:06:29 nit: move declaration to where it's used
DaveMoore 2009/10/23 18:11:10 To me...this is where it's used. All three declara
+ gfx::Canvas cc(0, 0, true);
+ int flags = is_multi_line_ ? ComputeMultiLineFlags() : 0;
+
+ cc.SizeStringInt(text_, font_, &w, &h, flags);
+ text_size_.SetSize(w, h);
if (highlighted_)
text_size_.Enlarge(1, 1);
text_size_valid_ = true;
« chrome/browser/views/about_chrome_view.cc ('K') | « chrome/browser/views/about_chrome_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698