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

Unified Diff: chrome/browser/ui/gtk/gtk_util.cc

Issue 11269022: Add Vector2d classes that represent offsets, instead of using Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: RenderText fixup Created 8 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: chrome/browser/ui/gtk/gtk_util.cc
diff --git a/chrome/browser/ui/gtk/gtk_util.cc b/chrome/browser/ui/gtk/gtk_util.cc
index 151793446386b04e21d9d45c131ec3038c724d39..a74ebb75e22e76aa205d3a2139ba13dd16cc8cfe 100644
--- a/chrome/browser/ui/gtk/gtk_util.cc
+++ b/chrome/browser/ui/gtk/gtk_util.cc
@@ -484,8 +484,7 @@ void ConvertWidgetPointToScreen(GtkWidget* widget, gfx::Point* p) {
DCHECK(widget);
DCHECK(p);
- gfx::Point position = ui::GetWidgetScreenPosition(widget);
- p->SetPoint(p->x() + position.x(), p->y() + position.y());
+ *p = p->Add(ui::GetWidgetScreenOffset(widget));
}
GtkWidget* CenterWidgetInHBox(GtkWidget* hbox, GtkWidget* widget,

Powered by Google App Engine
This is Rietveld 408576698