From a9741a3c07624404f14c5f32175335109d83e48c Mon Sep 17 00:00:00 2001 From: Ian Vollick Date: Mon, 16 Apr 2018 16:43:31 +0000 Subject: [PATCH] [vr] Fix shadow offsets Gives the omnibox a soft shadow. Bug: 833375 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_vr Change-Id: I17b9bbf4fdd2d8830e0157ddfd6b9ef57008ecb2 Reviewed-on: https://chromium-review.googlesource.com/1014010 Commit-Queue: Christopher Grant Reviewed-by: Christopher Grant Cr-Commit-Position: refs/heads/master@{#551010} --- chrome/browser/vr/ui_scene_creator.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chrome/browser/vr/ui_scene_creator.cc b/chrome/browser/vr/ui_scene_creator.cc index a5e1c2eeb8cca..e865b6f116c06 100644 --- a/chrome/browser/vr/ui_scene_creator.cc +++ b/chrome/browser/vr/ui_scene_creator.cc @@ -2423,7 +2423,7 @@ void UiSceneCreator::CreateOmnibox() { e->SetTransitionedProperties({}); y_offset += kUrlBarVerticalOffsetDMM; } - e->SetTranslate(0, y_offset, kOmniboxShadowOffset); + e->SetTranslate(0, y_offset, -kOmniboxShadowOffset); }, shadow.get()))); @@ -2631,6 +2631,7 @@ void UiSceneCreator::CreateOmnibox() { omnibox_background->set_hit_testable(true); omnibox_background->set_focusable(false); omnibox_background->set_corner_radius(kOmniboxCornerRadiusDMM); + omnibox_background->SetTranslate(0, 0, kOmniboxShadowOffset); VR_BIND_COLOR(model_, omnibox_background.get(), &ColorScheme::omnibox_background, &Rect::SetColor); omnibox_background->AddChild(std::move(omnibox_outer_layout));