From c639a36826c159c2bc98fb4ffa5c053dc58d3bae Mon Sep 17 00:00:00 2001 From: Imanol Fernandez Date: Thu, 5 Sep 2019 16:00:38 +0200 Subject: [PATCH] Fix fullscreen video control panel z-order issues (#1767) --- .../mozilla/vrbrowser/ui/widgets/BrightnessMenuWidget.java | 2 +- .../shared/org/mozilla/vrbrowser/ui/widgets/TrayWidget.java | 4 ++-- .../vrbrowser/ui/widgets/VideoProjectionMenuWidget.java | 2 +- app/src/main/res/values/dimen.xml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/BrightnessMenuWidget.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/BrightnessMenuWidget.java index fc03baeca..57dbf42ed 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/BrightnessMenuWidget.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/BrightnessMenuWidget.java @@ -23,7 +23,7 @@ protected void initializeWidgetPlacement(WidgetPlacement aPlacement) { aPlacement.anchorX = 0.0f; aPlacement.anchorY = 0.0f; aPlacement.translationY = WidgetPlacement.dpDimension(getContext(), R.dimen.video_projection_menu_translation_y); - aPlacement.translationZ = 2.0f; + aPlacement.translationZ = 30.0f; } public void setParentWidget(UIWidget aParent) { diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/TrayWidget.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/TrayWidget.java index 6dce9b306..4f6501114 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/TrayWidget.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/TrayWidget.java @@ -484,8 +484,8 @@ public void run() { mLibraryNotification.getPlacement().parentHandle = getHandle(); mLibraryNotification.getPlacement().anchorY = 0.0f; mLibraryNotification.getPlacement().translationX = (offsetViewBounds.left + mBookmarksButton.getWidth() / 2.0f) * ratio; - mLibraryNotification.getPlacement().translationY = ((offsetViewBounds.top - 60) * ratio); - mLibraryNotification.getPlacement().translationZ = 25.0f; + mLibraryNotification.getPlacement().translationY = ((offsetViewBounds.top - 66) * ratio); + mLibraryNotification.getPlacement().translationZ = 38.0f; mLibraryNotification.getPlacement().density = 3.0f; mLibraryNotification.setText(R.string.bookmarks_saved_notification); mLibraryNotification.setCurvedMode(false); diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/VideoProjectionMenuWidget.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/VideoProjectionMenuWidget.java index de71e721d..b92517141 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/VideoProjectionMenuWidget.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/VideoProjectionMenuWidget.java @@ -46,7 +46,7 @@ protected void initializeWidgetPlacement(WidgetPlacement aPlacement) { aPlacement.anchorX = 0.0f; aPlacement.anchorY = 0.0f; aPlacement.translationY = WidgetPlacement.dpDimension(getContext(), R.dimen.video_projection_menu_translation_y); - aPlacement.translationZ = 2.0f; + aPlacement.translationZ = 30.0f; } public void setParentWidget(UIWidget aParent) { diff --git a/app/src/main/res/values/dimen.xml b/app/src/main/res/values/dimen.xml index 6e9475779..940fc1034 100644 --- a/app/src/main/res/values/dimen.xml +++ b/app/src/main/res/values/dimen.xml @@ -83,7 +83,7 @@ 330dp - 7dp + 15dp 150dp