diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-17 22:25:33 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-17 22:25:33 +0000 |
commit | 6f3bb6ca5a2e423fc9dda71c164c7e8ae2a8eae7 (patch) | |
tree | 4ce1316dbfd179681bdff905a7d71f1b4cbb902c /chrome/views/label.cc | |
parent | 4c45708be10906e3cdbe9d40d206cfd3fcbaf1c2 (diff) | |
download | chromium_src-6f3bb6ca5a2e423fc9dda71c164c7e8ae2a8eae7.zip chromium_src-6f3bb6ca5a2e423fc9dda71c164c7e8ae2a8eae7.tar.gz chromium_src-6f3bb6ca5a2e423fc9dda71c164c7e8ae2a8eae7.tar.bz2 |
Rename legacy methods that were in CamelCase to unix_hacker.
Required going through and modifying some of the code to
solve name clashes.
Review URL: http://codereview.chromium.org/2945
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2337 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views/label.cc')
-rw-r--r-- | chrome/views/label.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/chrome/views/label.cc b/chrome/views/label.cc index a87e400..31053ac 100644 --- a/chrome/views/label.cc +++ b/chrome/views/label.cc @@ -54,7 +54,7 @@ void Label::GetPreferredSize(CSize* out) { DCHECK(out); if (is_multi_line_) { ChromeCanvas cc(0, 0, true); - int w = GetWidth(), h = 0; + int w = width(), h = 0; cc.SizeStringInt(text_, font_, &w, &h, ComputeMultiLineFlags()); out->cx = w; out->cy = h; @@ -110,8 +110,8 @@ void Label::Paint(ChromeCanvas* canvas) { } if (is_multi_line_) { - canvas->DrawStringInt(paint_text, font_, color_, 0, 0, GetWidth(), - GetHeight(), ComputeMultiLineFlags()); + canvas->DrawStringInt(paint_text, font_, color_, 0, 0, width(), + height(), ComputeMultiLineFlags()); PaintFocusBorder(canvas); } else { gfx::Rect text_bounds = GetTextBounds(); @@ -262,7 +262,7 @@ bool Label::GetTooltipText(int x, int y, std::wstring* tooltip) { } // Show the full text if the text does not fit. - if (!is_multi_line_ && font_.GetStringWidth(text_) > GetWidth()) { + if (!is_multi_line_ && font_.GetStringWidth(text_) > width()) { *tooltip = text_; return true; } @@ -302,7 +302,7 @@ ChromeFont Label::GetDefaultFont() { } void Label::UpdateContainsMouse(const MouseEvent& event) { - SetContainsMouse(GetTextBounds().Contains(event.GetX(), event.GetY())); + SetContainsMouse(GetTextBounds().Contains(event.x(), event.y())); } void Label::SetContainsMouse(bool contains_mouse) { @@ -317,12 +317,12 @@ gfx::Rect Label::GetTextBounds() { CSize text_size; GetTextSize(&text_size); gfx::Insets insets = GetInsets(); - int avail_width = GetWidth() - insets.left() - insets.right(); + int avail_width = width() - insets.left() - insets.right(); // Respect the size set by the owner view text_size.cx = std::min(avail_width, static_cast<int>(text_size.cx)); int text_y = insets.top() + - (GetHeight() - text_size.cy - insets.top() - insets.bottom()) / 2; + (height() - text_size.cy - insets.top() - insets.bottom()) / 2; int text_x; switch (horiz_alignment_) { case ALIGN_LEFT: @@ -334,7 +334,7 @@ gfx::Rect Label::GetTextBounds() { text_x = insets.left() + (avail_width + 1 - text_size.cx) / 2; break; case ALIGN_RIGHT: - text_x = GetWidth() - insets.right() - text_size.cx; + text_x = width() - insets.right() - text_size.cx; break; } return gfx::Rect(text_x, text_y, text_size.cx, text_size.cy); |