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

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

Issue 12310022: More flexibility in BubbleBorder arrow rendering. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address msw style nits. Created 7 years, 10 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 fa5786f4f798300a3559ad50116b9a15e89425ef..88bdeea119dde1abf47a7d20cc65f0b937dd16ad 100644
--- a/ui/views/bubble/tray_bubble_view.cc
+++ b/ui/views/bubble/tray_bubble_view.cc
@@ -50,7 +50,7 @@ class TrayBubbleBorder : public BubbleBorder {
tray_arrow_offset_(params.arrow_offset) {
set_alignment(params.arrow_alignment);
set_background_color(params.arrow_color);
- set_paint_arrow(!params.hide_arrow);
+ set_paint_arrow(params.arrow_paint_type);
}
virtual ~TrayBubbleBorder() {}
@@ -227,7 +227,7 @@ TrayBubbleView::InitParams::InitParams(AnchorType anchor_type,
arrow_color(SK_ColorBLACK),
arrow_location(BubbleBorder::NONE),
arrow_offset(kArrowDefaultOffset),
- hide_arrow(false),
+ arrow_paint_type(BubbleBorder::PAINT_NORMAL),
shadow(BubbleBorder::BIG_SHADOW),
arrow_alignment(BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE) {
}
@@ -321,8 +321,9 @@ void TrayBubbleView::SetWidth(int width) {
SizeToContents();
}
-void TrayBubbleView::SetPaintArrow(bool paint_arrow) {
- bubble_border_->set_paint_arrow(paint_arrow && !params_.hide_arrow);
+void TrayBubbleView::SetArrowPaintType(
+ views::BubbleBorder::ArrowPaintType paint_type) {
+ bubble_border_->set_paint_arrow(paint_type);
}
gfx::Insets TrayBubbleView::GetBorderInsets() const {
« 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