Commit d95b081e authored by Mathieu Perreault's avatar Mathieu Perreault Committed by Commit Bot

[Views] Draw an arrow for location bar bubbles on Mac, pre Material

On Views, there is no arrow draw if the bubble shows up on a user
gesture. For consistency, an arrow is now drawn on Mac, pre Material
Design.

Bug: 793077
Test: visual
Change-Id: Ic73856c6b07cdc3b5821fec918d44cd458847d04
Reviewed-on: https://chromium-review.googlesource.com/818154
Commit-Queue: Mathieu Perreault <mathp@chromium.org>
Reviewed-by: default avatarTrent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523096}
parent 6f2bb5a7
......@@ -4,6 +4,7 @@
#include "chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view.h"
#include "build/build_config.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
......@@ -82,9 +83,16 @@ LocationBarBubbleDelegateView::~LocationBarBubbleDelegateView() {}
void LocationBarBubbleDelegateView::ShowForReason(DisplayReason reason) {
if (reason == USER_GESTURE) {
#if defined(OS_MACOSX)
// In the USER_GESTURE case, the icon will be in an active state so the
// bubble doesn't need an arrow.
SetArrowPaintType(views::BubbleBorder::PAINT_TRANSPARENT);
// bubble doesn't need an arrow (except on non-MD MacViews).
const bool hide_arrow =
ui::MaterialDesignController::IsSecondaryUiMaterial();
#else
const bool hide_arrow = true;
#endif
if (hide_arrow)
SetArrowPaintType(views::BubbleBorder::PAINT_TRANSPARENT);
GetWidget()->Show();
} else {
GetWidget()->ShowInactive();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment