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

Unified Diff: ui/views/bubble/tray_bubble_view.cc

Issue 11819048: Implement message center on Windows (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address miket comments. Created 7 years, 11 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
« ui/views/bubble/tray_bubble_view.h ('K') | « ui/views/bubble/tray_bubble_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/bubble/tray_bubble_view.cc
diff --git a/ui/views/bubble/tray_bubble_view.cc b/ui/views/bubble/tray_bubble_view.cc
index f1dfbc1fbbbe622552a493ee13f4da12a2c7eb7c..7fff25bd92cd67f71a7d95808da314ef574d692d 100644
--- a/ui/views/bubble/tray_bubble_view.cc
+++ b/ui/views/bubble/tray_bubble_view.cc
@@ -48,7 +48,7 @@ class TrayBubbleBorder : public views::BubbleBorder {
owner_(owner),
anchor_(anchor),
tray_arrow_offset_(params.arrow_offset) {
- set_alignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE);
+ set_alignment(params.arrow_alignment);
set_background_color(params.arrow_color);
}
@@ -59,7 +59,7 @@ class TrayBubbleBorder : public views::BubbleBorder {
// it has no arrow.
virtual gfx::Rect GetBounds(const gfx::Rect& position_relative_to,
const gfx::Size& contents_size) const OVERRIDE {
- if (arrow_location() != NONE) {
+ if (has_arrow(arrow_location())) {
return views::BubbleBorder::GetBounds(position_relative_to,
contents_size);
}
@@ -233,7 +233,8 @@ TrayBubbleView::InitParams::InitParams(AnchorType anchor_type,
arrow_color(SK_ColorBLACK),
arrow_location(views::BubbleBorder::NONE),
arrow_offset(kArrowDefaultOffset),
- shadow(views::BubbleBorder::BIG_SHADOW) {
+ shadow(views::BubbleBorder::BIG_SHADOW),
+ arrow_alignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE) {
}
// static
@@ -293,7 +294,7 @@ TrayBubbleView::~TrayBubbleView() {
void TrayBubbleView::InitializeAndShowBubble() {
// Must occur after call to BubbleDelegateView::CreateBubble().
- SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE);
+ SetAlignment(params_.arrow_alignment);
bubble_border_->UpdateArrowOffset();
if (get_use_acceleration_when_possible())
« ui/views/bubble/tray_bubble_view.h ('K') | « ui/views/bubble/tray_bubble_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698