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

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 sky/msw comments + rebase. 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
« no previous file with comments | « 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 3b13f2b5da61a4de3a4fd6d316b3c86de56b513a..c81752dca7e251567d52dac65ad9a2c7ade93d51 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);
set_paint_arrow(!params.hide_arrow);
}
@@ -60,7 +60,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);
}
@@ -235,7 +235,8 @@ TrayBubbleView::InitParams::InitParams(AnchorType anchor_type,
arrow_location(views::BubbleBorder::NONE),
arrow_offset(kArrowDefaultOffset),
hide_arrow(false),
- shadow(views::BubbleBorder::BIG_SHADOW) {
+ shadow(views::BubbleBorder::BIG_SHADOW),
+ arrow_alignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE) {
}
// static
@@ -295,7 +296,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())
« no previous file with comments | « 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