Index: ui/views/bubble/bubble_dialog_delegate.cc |
diff --git a/ui/views/bubble/bubble_dialog_delegate.cc b/ui/views/bubble/bubble_dialog_delegate.cc |
index 369467778fe2b3512a34b6807e92fbfb9dcca4a6..59839479a40b04f1e4cf2c48deb5b9666dfede6f 100644 |
--- a/ui/views/bubble/bubble_dialog_delegate.cc |
+++ b/ui/views/bubble/bubble_dialog_delegate.cc |
@@ -6,6 +6,7 @@ |
#include "build/build_config.h" |
#include "ui/accessibility/ax_node_data.h" |
+#include "ui/base/default_style.h" |
#include "ui/base/material_design/material_design_controller.h" |
#include "ui/base/resource/resource_bundle.h" |
#include "ui/gfx/color_utils.h" |
@@ -15,6 +16,7 @@ |
#include "ui/views/focus/view_storage.h" |
#include "ui/views/layout/layout_constants.h" |
#include "ui/views/style/platform_style.h" |
+#include "ui/views/views_delegate.h" |
#include "ui/views/widget/widget.h" |
#include "ui/views/widget/widget_observer.h" |
#include "ui/views/window/dialog_client_view.h" |
@@ -102,8 +104,11 @@ ClientView* BubbleDialogDelegateView::CreateClientView(Widget* widget) { |
NonClientFrameView* BubbleDialogDelegateView::CreateNonClientFrameView( |
Widget* widget) { |
+ ViewsDelegate* views_delegate = ViewsDelegate::GetInstance(); |
BubbleFrameView* frame = new BubbleFrameView( |
- gfx::Insets(kPanelVertMargin, kPanelHorizMargin, 0, kPanelHorizMargin), |
+ views_delegate ? views_delegate->GetDialogFrameViewInsets() |
+ : gfx::Insets(kPanelVertMargin, kPanelHorizMargin, 0, |
+ kPanelHorizMargin), |
margins()); |
// Note: In CreateBubble, the call to SizeToContents() will cause |
// the relayout that this call requires. |
@@ -212,13 +217,13 @@ BubbleDialogDelegateView::BubbleDialogDelegateView(View* anchor_view, |
mirror_arrow_in_rtl_(PlatformStyle::kMirrorBubbleArrowInRTLByDefault), |
shadow_(BubbleBorder::SMALL_SHADOW), |
color_explicitly_set_(false), |
- margins_(kPanelVertMargin, |
- kPanelHorizMargin, |
- kPanelVertMargin, |
- kPanelHorizMargin), |
accept_events_(true), |
adjust_if_offscreen_(true), |
parent_window_(NULL) { |
+ margins_ = ViewsDelegate::GetInstance() |
+ ? ViewsDelegate::GetInstance()->GetBubbleDialogMargins() |
+ : gfx::Insets(kPanelVertMargin, kPanelHorizMargin, |
+ kPanelVertMargin, kPanelHorizMargin); |
if (anchor_view) |
SetAnchorView(anchor_view); |
UpdateColorsFromTheme(GetNativeTheme()); |
@@ -235,6 +240,8 @@ gfx::Rect BubbleDialogDelegateView::GetBubbleBounds() { |
const gfx::FontList& BubbleDialogDelegateView::GetTitleFontList() const { |
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
+ if (ui::MaterialDesignController::IsSecondaryUiMaterial()) |
+ return rb.GetFontListWithDelta(ui::kTitleFontSizeDelta); |
return rb.GetFontList(ui::ResourceBundle::MediumFont); |
} |