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

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: rebasefinal 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..5c32d6e2f4662469b46c5675b496deaf226f7753 100644
--- a/chrome/browser/ui/gtk/gtk_util.cc
+++ b/chrome/browser/ui/gtk/gtk_util.cc
@@ -484,8 +484,8 @@ 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());
+ gfx::Vector2d offset = ui::GetWidgetScreenOffset(widget);
+ *p = p->Add(offset);
danakj 2012/10/29 19:17:20 inlined.
}
GtkWidget* CenterWidgetInHBox(GtkWidget* hbox, GtkWidget* widget,

Powered by Google App Engine
This is Rietveld 408576698