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

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

Issue 2174643002: [ash-md] Updates ash shelf tooltips to MD (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« ash/shelf/shelf_tooltip_manager.cc ('K') | « ui/views/bubble/bubble_border.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/bubble/bubble_frame_view.cc
diff --git a/ui/views/bubble/bubble_frame_view.cc b/ui/views/bubble/bubble_frame_view.cc
index a3f4bf162692ea328fba73cb584177d7518de1ba..60ae2cbc8c8bd884e09576436fe5ce6c695c54a5 100644
--- a/ui/views/bubble/bubble_frame_view.cc
+++ b/ui/views/bubble/bubble_frame_view.cc
@@ -172,21 +172,22 @@ int BubbleFrameView::NonClientHitTest(const gfx::Point& point) {
void BubbleFrameView::GetWindowMask(const gfx::Size& size,
gfx::Path* window_mask) {
+ const bool no_assets = bubble_border_->shadow() == BubbleBorder::NO_ASSETS ||
+ bubble_border_->shadow() == BubbleBorder::NO_ASSETS_TOOLTIP;
if (bubble_border_->shadow() != BubbleBorder::SMALL_SHADOW &&
bubble_border_->shadow() != BubbleBorder::NO_SHADOW_OPAQUE_BORDER &&
- bubble_border_->shadow() != BubbleBorder::NO_ASSETS)
+ !no_assets)
return;
// We don't return a mask for windows with arrows unless they use
- // BubbleBorder::NO_ASSETS.
- if (bubble_border_->shadow() != BubbleBorder::NO_ASSETS &&
+ // BubbleBorder::NO_ASSETS or BubbleBorder::NO_ASSETS_TOOLTIP.
+ if (!no_assets &&
bubble_border_->arrow() != BubbleBorder::NONE &&
bubble_border_->arrow() != BubbleBorder::FLOAT)
return;
// Use a window mask roughly matching the border in the image assets.
- const int kBorderStrokeSize =
- bubble_border_->shadow() == BubbleBorder::NO_ASSETS ? 0 : 1;
+ const int kBorderStrokeSize = no_assets ? 0 : 1;
const SkScalar kCornerRadius =
SkIntToScalar(bubble_border_->GetBorderCornerRadius());
const gfx::Insets border_insets = bubble_border_->GetInsets();
@@ -198,7 +199,7 @@ void BubbleFrameView::GetWindowMask(const gfx::Size& size,
kBorderStrokeSize)};
if (bubble_border_->shadow() == BubbleBorder::NO_SHADOW_OPAQUE_BORDER ||
- bubble_border_->shadow() == BubbleBorder::NO_ASSETS) {
+ no_assets) {
window_mask->addRoundRect(rect, kCornerRadius, kCornerRadius);
} else {
static const int kBottomBorderShadowSize = 2;
« ash/shelf/shelf_tooltip_manager.cc ('K') | « ui/views/bubble/bubble_border.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698