Commit 02e18b38 authored by David Dorwin's avatar David Dorwin Committed by Commit Bot

Update VR Button element's description

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I913d26985c4fbe9ed1a9daea65ec57094aaf5043
Reviewed-on: https://chromium-review.googlesource.com/786327
Commit-Queue: David Dorwin <ddorwin@chromium.org>
Reviewed-by: default avatarIan Vollick <vollick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521155}
parent e40bdf1c
...@@ -137,11 +137,11 @@ void Button::NotifyClientSizeAnimated(const gfx::SizeF& size, ...@@ -137,11 +137,11 @@ void Button::NotifyClientSizeAnimated(const gfx::SizeF& size,
cc::Animation* animation) { cc::Animation* animation) {
if (target_property_id == BOUNDS) { if (target_property_id == BOUNDS) {
background_->SetSize(size.width(), size.height()); background_->SetSize(size.width(), size.height());
background_->set_corner_radius(size.width() * 0.5f); background_->set_corner_radius(size.width() * 0.5f); // Creates a circle.
foreground_->SetSize(size.width() * kIconScaleFactor, foreground_->SetSize(size.width() * kIconScaleFactor,
size.height() * kIconScaleFactor); size.height() * kIconScaleFactor);
hit_plane_->SetSize(size.width(), size.height()); hit_plane_->SetSize(size.width(), size.height());
hit_plane_->set_corner_radius(size.width() * 0.5f); hit_plane_->set_corner_radius(size.width() * 0.5f); // Creates a circle.
} }
UiElement::NotifyClientSizeAnimated(size, target_property_id, animation); UiElement::NotifyClientSizeAnimated(size, target_property_id, animation);
} }
......
...@@ -24,8 +24,9 @@ namespace vr { ...@@ -24,8 +24,9 @@ namespace vr {
class Rect; class Rect;
class VectorIcon; class VectorIcon;
// Button has rounded rect as background and a vector icon as the foregroud. // Button has a circle as the background and a vector icon as the foreground.
// When hovered, background and foreground both move forward on Z axis. // When hovered, background and foreground both move forward on Z axis.
// This matches the Daydream disk-style button.
class Button : public UiElement { class Button : public UiElement {
public: public:
Button(base::Callback<void()> click_handler, const gfx::VectorIcon& icon); Button(base::Callback<void()> click_handler, const gfx::VectorIcon& icon);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment