Chromium Code Reviews| 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 378aa7d88f7bf93e62a1544e88b9b1d9df6426af..13c064c5362e1c689abdae6568e71f9de4f3f463 100644 |
| --- a/chrome/browser/android/vr_shell/ui_scene_manager.cc |
| +++ b/chrome/browser/android/vr_shell/ui_scene_manager.cc |
| @@ -29,13 +29,22 @@ static constexpr float kPermanentWarningWidth = 0.224f; |
| static constexpr float kTransientWarningHeight = 0.160; |
| static constexpr float kTransientWarningWidth = 0.512; |
| -static constexpr float kContentWidth = 2.4; |
| -static constexpr float kContentHeight = 1.6; |
| static constexpr float kContentDistance = 2.5; |
| -static constexpr float kContentVerticalOffset = -0.26; |
| +static constexpr float kContentWidth = 0.96 * kContentDistance; |
| +static constexpr float kContentHeight = 0.64 * kContentDistance; |
| +static constexpr float kContentVerticalOffset = -0.1 * kContentDistance; |
| static constexpr float kBackplaneSize = 1000.0; |
| static constexpr float kBackgroundDistanceMultiplier = 1.414; |
| +static constexpr float kUrlBarDistance = 2.4; |
|
cjgrant
2017/05/16 14:07:23
Not in this CL, but what do you think of Josh's ap
mthiesse
2017/05/16 18:11:02
For now I'd like to land as-is, we have some think
|
| +static constexpr float kUrlBarWidth = 0.672 * kUrlBarDistance; |
| +static constexpr float kUrlBarHeight = 0.088 * kUrlBarDistance; |
| +static constexpr float kUrlBarVerticalOffset = -0.516 * kUrlBarDistance; |
| + |
| +static constexpr float kLoadingIndicatorWidth = 0.24 * kUrlBarDistance; |
| +static constexpr float kLoadingIndicatorHeight = 0.008 * kUrlBarDistance; |
| +static constexpr float kLoadingIndicatorOffset = -0.020 * kUrlBarDistance; |
|
cjgrant
2017/05/16 14:07:23
Worth it to do (0.016 + kLoadingIndicatorHeight /
mthiesse
2017/05/16 18:11:02
Done.
|
| + |
| static constexpr float kFullscreenWidth = 2.88; |
| static constexpr float kFullscreenHeight = 1.62; |
| static constexpr float kFullscreenDistance = 3; |
| @@ -190,8 +199,8 @@ void UiSceneManager::CreateUrlBar() { |
| // TODO(cjgrant): Incorporate final size and position. |
| auto url_bar = base::MakeUnique<UrlBar>(512); |
| url_bar->set_id(AllocateId()); |
| - url_bar->set_translation({0, -0.9, -1.8}); |
| - url_bar->set_size({0.9, 0, 1}); |
| + url_bar->set_translation({0, kUrlBarVerticalOffset, -kUrlBarDistance}); |
| + url_bar->set_size({kUrlBarWidth, kUrlBarHeight, 1}); |
| url_bar->SetBackButtonCallback( |
| base::Bind(&UiSceneManager::OnBackButtonClicked, base::Unretained(this))); |
| url_bar_ = url_bar.get(); |
| @@ -200,8 +209,10 @@ void UiSceneManager::CreateUrlBar() { |
| auto indicator = base::MakeUnique<LoadingIndicator>(256); |
| indicator->set_id(AllocateId()); |
| - indicator->set_translation({0, -0.8, -1.8}); |
| - indicator->set_size({0.4, 0, 1}); |
| + indicator->set_translation({0, 0, kLoadingIndicatorOffset}); |
| + indicator->set_size({kLoadingIndicatorWidth, kLoadingIndicatorHeight, 1}); |
| + indicator->set_parent_id(url_bar_->id()); |
| + indicator->set_y_anchoring(YAnchoring::YTOP); |
| loading_indicator_ = indicator.get(); |
| control_elements_.push_back(indicator.get()); |
| scene_->AddUiElement(std::move(indicator)); |