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

Unified Diff: chrome/browser/chromeos/setting_level_bubble.cc

Issue 8863009: Fix alignment of avatar bubbles in the NTP (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use Rect::Ofset() Created 9 years 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/chromeos/setting_level_bubble.cc
diff --git a/chrome/browser/chromeos/setting_level_bubble.cc b/chrome/browser/chromeos/setting_level_bubble.cc
index 250d333da841361e8fd7abeb15078f3c086fff3d..6a474236bd1b45bb213804bd6e6bab3020bb2127 100644
--- a/chrome/browser/chromeos/setting_level_bubble.cc
+++ b/chrome/browser/chromeos/setting_level_bubble.cc
@@ -59,7 +59,7 @@ namespace chromeos {
class SettingLevelBubbleDelegateView : public views::BubbleDelegateView {
public:
// BubbleDelegate overrides:
- virtual gfx::Point GetAnchorPoint() OVERRIDE;
+ virtual gfx::Rect GetAnchorRect() OVERRIDE;
// Create the bubble delegate view.
SettingLevelBubbleDelegateView();
@@ -77,15 +77,15 @@ class SettingLevelBubbleDelegateView : public views::BubbleDelegateView {
DISALLOW_COPY_AND_ASSIGN(SettingLevelBubbleDelegateView);
};
-gfx::Point SettingLevelBubbleDelegateView::GetAnchorPoint() {
+gfx::Rect SettingLevelBubbleDelegateView::GetAnchorRect() {
gfx::Size view_size = GetPreferredSize();
// Calculate the position in screen coordinates that the bubble should
// "point" at (since we use BubbleBorder::FLOAT, this position actually
// specifies the center of the bubble).
gfx::Rect monitor_area = gfx::Screen::GetMonitorAreaNearestWindow(NULL);
- return (gfx::Point(
+ return (gfx::Rect(
monitor_area.x() + kBubbleXRatio * monitor_area.width(),
- monitor_area.bottom() - view_size.height() / 2 - kBubbleBottomGap));
+ monitor_area.bottom() - view_size.height() / 2 - kBubbleBottomGap, 0, 0));
}
SettingLevelBubbleDelegateView::SettingLevelBubbleDelegateView()

Powered by Google App Engine
This is Rietveld 408576698