Commit 20a02436 authored by Tommy Steimel's avatar Tommy Steimel Committed by Commit Bot

GMC: Add border radius to media dialog

This CL adds an 8px border radius to the GMC dialog to match the specs.

Bug: 982925
Change-Id: Ib72984982cbe7f5874176ef325aecfb9a80734b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1716603Reviewed-by: default avatarBecca Hughes <beccahughes@chromium.org>
Commit-Queue: Tommy Steimel <steimel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#680573}
parent e3ed2f0e
...@@ -10,12 +10,18 @@ ...@@ -10,12 +10,18 @@
#include "chrome/browser/ui/views/global_media_controls/media_notification_list_view.h" #include "chrome/browser/ui/views/global_media_controls/media_notification_list_view.h"
#include "services/media_session/public/mojom/media_session.mojom.h" #include "services/media_session/public/mojom/media_session.mojom.h"
#include "ui/views/background.h" #include "ui/views/background.h"
#include "ui/views/bubble/bubble_frame_view.h"
#include "ui/views/controls/label.h" #include "ui/views/controls/label.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/layout/fill_layout.h" #include "ui/views/layout/fill_layout.h"
using media_session::mojom::MediaSessionAction; using media_session::mojom::MediaSessionAction;
namespace {
constexpr int kMediaDialogCornerRadius = 8;
} // anonymous namespace
// static // static
MediaDialogView* MediaDialogView::instance_ = nullptr; MediaDialogView* MediaDialogView::instance_ = nullptr;
...@@ -67,6 +73,12 @@ bool MediaDialogView::Close() { ...@@ -67,6 +73,12 @@ bool MediaDialogView::Close() {
return Cancel(); return Cancel();
} }
void MediaDialogView::AddedToWidget() {
views::BubbleFrameView* frame = GetBubbleFrameView();
if (frame)
frame->SetCornerRadius(kMediaDialogCornerRadius);
}
gfx::Size MediaDialogView::CalculatePreferredSize() const { gfx::Size MediaDialogView::CalculatePreferredSize() const {
// If we have active sessions, then fit to them. // If we have active sessions, then fit to them.
if (!active_sessions_view_->empty()) if (!active_sessions_view_->empty())
......
...@@ -36,6 +36,7 @@ class MediaDialogView : public views::BubbleDialogDelegateView, ...@@ -36,6 +36,7 @@ class MediaDialogView : public views::BubbleDialogDelegateView,
bool Close() override; bool Close() override;
// views::View implementation. // views::View implementation.
void AddedToWidget() override;
gfx::Size CalculatePreferredSize() const override; gfx::Size CalculatePreferredSize() const override;
private: private:
......
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