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

Unified Diff: views/touchui/touch_selection_controller_impl.cc

Issue 8405002: ui/gfx: Convert Canvas::FillRectInt() to use gfx::Rect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: save some vertical space, interactive_ui_tests are fixed by Peter's fix Created 9 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
« no previous file with comments | « views/examples/native_widget_views_example.cc ('k') | views/window/custom_frame_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/touchui/touch_selection_controller_impl.cc
diff --git a/views/touchui/touch_selection_controller_impl.cc b/views/touchui/touch_selection_controller_impl.cc
index 6ce527efe6353d7572b501c2aef92feea1216d2a..e590216e9bbfeba77b040cca0683637140216d3d 100644
--- a/views/touchui/touch_selection_controller_impl.cc
+++ b/views/touchui/touch_selection_controller_impl.cc
@@ -4,8 +4,8 @@
#include "views/touchui/touch_selection_controller_impl.h"
-#include "base/utf_string_conversions.h"
#include "base/time.h"
+#include "base/utf_string_conversions.h"
#include "grit/ui_strings.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
#include "ui/base/l10n/l10n_util.h"
@@ -21,8 +21,8 @@
#include "views/controls/button/button.h"
#include "views/controls/button/custom_button.h"
#include "views/controls/button/text_button.h"
-#include "views/controls/menu/menu_config.h"
#include "views/controls/label.h"
+#include "views/controls/menu/menu_config.h"
#include "views/layout/box_layout.h"
#include "views/widget/widget.h"
@@ -191,15 +191,15 @@ class ContextMenuButtonBackground : public Background {
}
int w = view->width();
int h = view->height();
- canvas->FillRectInt(background_color, 1, 1, w - 2, h - 2);
- canvas->FillRectInt(border_color, 2, 0, w - 4, 1);
- canvas->FillRectInt(border_color, 1, 1, 1, 1);
- canvas->FillRectInt(border_color, 0, 2, 1, h - 4);
- canvas->FillRectInt(border_color, 1, h - 2, 1, 1);
- canvas->FillRectInt(border_color, 2, h - 1, w - 4, 1);
- canvas->FillRectInt(border_color, w - 2, 1, 1, 1);
- canvas->FillRectInt(border_color, w - 1, 2, 1, h - 4);
- canvas->FillRectInt(border_color, w - 2, h - 2, 1, 1);
+ canvas->FillRect(background_color, gfx::Rect(1, 1, w - 2, h - 2));
+ canvas->FillRect(border_color, gfx::Rect(2, 0, w - 4, 1));
+ canvas->FillRect(border_color, gfx::Rect(1, 1, 1, 1));
+ canvas->FillRect(border_color, gfx::Rect(0, 2, 1, h - 4));
+ canvas->FillRect(border_color, gfx::Rect(1, h - 2, 1, 1));
+ canvas->FillRect(border_color, gfx::Rect(2, h - 1, w - 4, 1));
+ canvas->FillRect(border_color, gfx::Rect(w - 2, 1, 1, 1));
+ canvas->FillRect(border_color, gfx::Rect(w - 1, 2, 1, h - 4));
+ canvas->FillRect(border_color, gfx::Rect(w - 2, h - 2, 1, 1));
}
private:
« no previous file with comments | « views/examples/native_widget_views_example.cc ('k') | views/window/custom_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698