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

Unified Diff: ui/views/widget/native_widget_aura.cc

Issue 2596743002: Replace WM shadow types (on/off) and styles (small/inactive/active) (Closed)
Patch Set: . Created 4 years 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
Index: ui/views/widget/native_widget_aura.cc
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index 80be94f24d3eb643353ca43b68cb41440182b8d1..6beb47df94d7106d0d92fdd823fc5ac79635534a 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -143,10 +143,13 @@ void NativeWidgetAura::InitNativeWidget(const Widget::InitParams& params) {
window_->Init(params.layer_type);
// Set name after layer init so it propagates to layer.
window_->SetName(params.name);
- if (params.shadow_type == Widget::InitParams::SHADOW_TYPE_NONE)
- SetShadowType(window_, wm::SHADOW_TYPE_NONE);
- else if (params.shadow_type == Widget::InitParams::SHADOW_TYPE_DROP)
- SetShadowType(window_, wm::SHADOW_TYPE_RECTANGULAR);
+ if (params.shadow_type == Widget::InitParams::SHADOW_TYPE_NONE) {
+ SetShadowElevation(window_, wm::ShadowElevation::NONE);
sky 2017/01/03 22:35:38 Isn't this the default?
Evan Stade 2017/01/04 00:20:45 The default depends on the platform and the type o
+ } else if (params.shadow_type == Widget::InitParams::SHADOW_TYPE_DROP &&
+ params.shadow_elevation >= 0) {
+ SetShadowElevation(
+ window_, static_cast<wm::ShadowElevation>(params.shadow_elevation));
+ }
if (params.type == Widget::InitParams::TYPE_CONTROL)
window_->Show();

Powered by Google App Engine
This is Rietveld 408576698