Commit dc4873aa authored by Manas Verma's avatar Manas Verma Committed by Commit Bot

Renaming IconLabelBubble constants to avoid compilation error.


The variable `kTweenType` was re-defined in another class. Renaming it to `kIconLabelBubbleTweenType`, and changed the other constants similarly to avoid future conflicts.

Original change introduced here: https://chromium-review.googlesource.com/c/chromium/src/+/1162862


Bug: 855186
Change-Id: I94d3ea5b4732bac586780e441804a3e98bb99bb0
Reviewed-on: https://chromium-review.googlesource.com/1174893
Commit-Queue: Manas Verma <manasverma@google.com>
Reviewed-by: default avatarEvan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583003}
parent 9d2b24b2
...@@ -45,17 +45,18 @@ constexpr int kIconLabelBubbleFadeInDurationMs = 250; ...@@ -45,17 +45,18 @@ constexpr int kIconLabelBubbleFadeInDurationMs = 250;
constexpr int kIconLabelBubbleFadeOutDurationMs = 175; constexpr int kIconLabelBubbleFadeOutDurationMs = 175;
// The type of tweening for the animation. // The type of tweening for the animation.
const gfx::Tween::Type kTweenType = gfx::Tween::EASE_IN_OUT; const gfx::Tween::Type kIconLabelBubbleTweenType = gfx::Tween::EASE_IN_OUT;
// The time for the text to animate out, as well as in. // The time for the text to animate out, as well as in.
constexpr int kSlideTimeMS = 600; constexpr int kIconLabelBubbleSlideTimeMs = 600;
// The total time for the in and out text animation. // The total time for the in and out text animation.
constexpr int kAnimationDurationMS = 3000; constexpr int kIconLabelBubbleAnimationDurationMs = 3000;
// The fraction of time taken for the text to animate out, as well as in. // The fraction of time taken for the text to animate out, as well as in.
const double kOpenTimeFraction = const double kIconLabelBubbleOpenTimeFraction =
static_cast<double>(kSlideTimeMS) / kAnimationDurationMS; static_cast<double>(kIconLabelBubbleSlideTimeMs) /
kIconLabelBubbleAnimationDurationMs;
} // namespace } // namespace
////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////
...@@ -539,10 +540,10 @@ void IconLabelBubbleView::SetUpForInOutAnimation() { ...@@ -539,10 +540,10 @@ void IconLabelBubbleView::SetUpForInOutAnimation() {
label_->SetElideBehavior(gfx::NO_ELIDE); label_->SetElideBehavior(gfx::NO_ELIDE);
label_->SetVisible(false); label_->SetVisible(false);
slide_animation_.SetSlideDuration(kAnimationDurationMS); slide_animation_.SetSlideDuration(kIconLabelBubbleAnimationDurationMs);
slide_animation_.SetTweenType(kTweenType); slide_animation_.SetTweenType(kIconLabelBubbleTweenType);
open_state_fraction_ = open_state_fraction_ = gfx::Tween::CalculateValue(
gfx::Tween::CalculateValue(kTweenType, kOpenTimeFraction); kIconLabelBubbleTweenType, kIconLabelBubbleOpenTimeFraction);
} }
void IconLabelBubbleView::AnimateIn(int string_id) { void IconLabelBubbleView::AnimateIn(int string_id) {
......
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