summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/controls/button/checkbox.cc3
-rw-r--r--views/controls/button/text_button.cc2
-rw-r--r--views/controls/label.cc3
-rw-r--r--views/view.cc4
4 files changed, 5 insertions, 7 deletions
diff --git a/views/controls/button/checkbox.cc b/views/controls/button/checkbox.cc
index b60e802..da2b04c 100644
--- a/views/controls/button/checkbox.cc
+++ b/views/controls/button/checkbox.cc
@@ -66,8 +66,7 @@ void Checkbox::OnPaintFocusBorder(gfx::Canvas* canvas) {
// Increate the bounding box by one on each side so that that focus border
// does not draw on top of the letters.
bounds.Inset(-1, -1, -1, -1);
- canvas->DrawFocusRect(bounds.x(), bounds.y(), bounds.width(),
- bounds.height());
+ canvas->DrawFocusRect(bounds);
}
}
diff --git a/views/controls/button/text_button.cc b/views/controls/button/text_button.cc
index 755196a..b9c7bcce 100644
--- a/views/controls/button/text_button.cc
+++ b/views/controls/button/text_button.cc
@@ -830,7 +830,7 @@ void NativeTextButton::OnPaintFocusBorder(gfx::Canvas* canvas) {
if ((IsFocusable() || IsAccessibilityFocusableInRootView()) && HasFocus()) {
gfx::Rect rect(GetLocalBounds());
rect.Inset(3, 3);
- canvas->DrawFocusRect(rect.x(), rect.y(), rect.width(), rect.height());
+ canvas->DrawFocusRect(rect);
}
#else
TextButton::OnPaintFocusBorder(canvas);
diff --git a/views/controls/label.cc b/views/controls/label.cc
index 33fbcd4..16248d9 100644
--- a/views/controls/label.cc
+++ b/views/controls/label.cc
@@ -275,8 +275,7 @@ void Label::PaintText(gfx::Canvas* canvas,
if (HasFocus() || paint_as_focused_) {
gfx::Rect focus_bounds = text_bounds;
focus_bounds.Inset(-kFocusBorderPadding, -kFocusBorderPadding);
- canvas->DrawFocusRect(focus_bounds.x(), focus_bounds.y(),
- focus_bounds.width(), focus_bounds.height());
+ canvas->DrawFocusRect(focus_bounds);
}
}
diff --git a/views/view.cc b/views/view.cc
index e4ffbe8..2d4a60d 100644
--- a/views/view.cc
+++ b/views/view.cc
@@ -299,7 +299,7 @@ gfx::Rect View::GetContentsBounds() const {
}
gfx::Rect View::GetLocalBounds() const {
- return gfx::Rect(0, 0, width(), height());
+ return gfx::Rect(gfx::Point(), size());
}
gfx::Insets View::GetInsets() const {
@@ -1079,7 +1079,7 @@ void View::OnPaintBorder(gfx::Canvas* canvas) {
void View::OnPaintFocusBorder(gfx::Canvas* canvas) {
if ((IsFocusable() || IsAccessibilityFocusableInRootView()) && HasFocus())
- canvas->DrawFocusRect(0, 0, width(), height());
+ canvas->DrawFocusRect(GetLocalBounds());
}
// Accelerated Painting --------------------------------------------------------