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

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: merge 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
« no previous file with comments | « no previous file | chrome/browser/speech/speech_input_bubble_views.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 26f5a30bcbbda771d8bb738439f55ae00c4da4e7..2f3b9edb656896fed4ecb56cb9d51de02f712939 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()
« no previous file with comments | « no previous file | chrome/browser/speech/speech_input_bubble_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698