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

Unified Diff: chrome/browser/android/vr_shell/ui_scene_manager.cc

Issue 2928593002: VR: Improving UI colors and elements positioning (Closed)
Patch Set: Created 3 years, 6 months 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
« no previous file with comments | « chrome/browser/android/vr_shell/textures/url_bar_texture_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/ui_scene_manager.cc
diff --git a/chrome/browser/android/vr_shell/ui_scene_manager.cc b/chrome/browser/android/vr_shell/ui_scene_manager.cc
index 1c18411ea2c76e70eb243ddde5fb7d923bb696b2..6d24738dd1b9044d58b9e714e1581d133ed851a0 100644
--- a/chrome/browser/android/vr_shell/ui_scene_manager.cc
+++ b/chrome/browser/android/vr_shell/ui_scene_manager.cc
@@ -51,11 +51,16 @@ static constexpr float kUrlBarDistance = 2.4;
static constexpr float kUrlBarWidth = 0.672 * kUrlBarDistance;
static constexpr float kUrlBarHeight = 0.088 * kUrlBarDistance;
static constexpr float kUrlBarVerticalOffset = -0.516 * kUrlBarDistance;
+static constexpr float kUrlBarRotationRad = -0.175;
static constexpr float kLoadingIndicatorWidth = 0.24 * kUrlBarDistance;
static constexpr float kLoadingIndicatorHeight = 0.008 * kUrlBarDistance;
-static constexpr float kLoadingIndicatorOffset =
- -0.016 * kUrlBarDistance - kLoadingIndicatorHeight / 2;
+static constexpr float kLoadingIndicatorVerticalOffset =
+ (-kUrlBarVerticalOffset + kContentVerticalOffset - kContentHeight / 2 -
+ kUrlBarHeight / 2) /
+ 2;
+static constexpr float kLoadingIndicatorDepthOffset =
+ (kUrlBarDistance - kContentDistance) / 2;
static constexpr float kSceneSize = 25.0;
static constexpr float kSceneHeight = 4.0;
@@ -261,6 +266,7 @@ void UiSceneManager::CreateUrlBar() {
url_bar->set_debug_id(kUrlBar);
url_bar->set_id(AllocateId());
url_bar->set_translation({0, kUrlBarVerticalOffset, -kUrlBarDistance});
+ url_bar->set_rotation({1.0, 0.0, 0.0, kUrlBarRotationRad});
url_bar->set_size({kUrlBarWidth, kUrlBarHeight, 1});
url_bar->SetBackButtonCallback(
base::Bind(&UiSceneManager::OnBackButtonClicked, base::Unretained(this)));
@@ -271,7 +277,8 @@ void UiSceneManager::CreateUrlBar() {
auto indicator = base::MakeUnique<LoadingIndicator>(256);
indicator->set_debug_id(kLoadingIndicator);
indicator->set_id(AllocateId());
- indicator->set_translation({0, 0, kLoadingIndicatorOffset});
+ indicator->set_translation(
+ {0, kLoadingIndicatorVerticalOffset, kLoadingIndicatorDepthOffset});
indicator->set_size({kLoadingIndicatorWidth, kLoadingIndicatorHeight, 1});
indicator->set_parent_id(url_bar_->id());
indicator->set_y_anchoring(YAnchoring::YTOP);
« no previous file with comments | « chrome/browser/android/vr_shell/textures/url_bar_texture_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698