Commit 378d99f7 authored by Anastasia Helfinstein's avatar Anastasia Helfinstein Committed by Commit Bot

[Switch Access] Make panel window transparent

The specification for the Switch Access menu (see bug for full details)
specifies that the menu should be translucent, with rounded corners.
To accomplish this, we need to make the underlying view transparent.

Previously, the menu showed with a white background filling the
bounding box.

Bug: 973719
Change-Id: I101bb6203fd8c972f7b235821e0f0a51cafa25e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2085596Reviewed-by: default avatarDavid Tseng <dtseng@chromium.org>
Commit-Queue: Anastasia Helfinstein <anastasi@google.com>
Cr-Commit-Position: refs/heads/master@{#747952}
parent f8d77eb1
......@@ -7,6 +7,8 @@
#include "ash/public/cpp/accessibility_controller.h"
#include "ash/public/cpp/accessibility_controller_enums.h"
#include "base/no_destructor.h"
#include "content/public/browser/render_widget_host_view.h"
#include "ui/aura/window.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
#include "ui/views/widget/widget.h"
......@@ -27,6 +29,10 @@ const std::string& UrlForContent() {
SwitchAccessPanel::SwitchAccessPanel(content::BrowserContext* browser_context)
: AccessibilityPanel(browser_context, UrlForContent(), kWidgetName) {
content::RenderWidgetHostView* view =
GetWebContents()->GetMainFrame()->GetView();
view->SetBackgroundColor(SK_ColorTRANSPARENT);
view->GetNativeView()->SetTransparent(true);
Hide();
}
......
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