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

Unified Diff: ui/message_center/views/toast_contents_view.cc

Issue 2016203002: Widget opacity goes from 0 to 1, not 0 to 255. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resync Created 4 years, 7 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/ui/views/new_back_shortcut_bubble.cc ('k') | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/views/toast_contents_view.cc
diff --git a/ui/message_center/views/toast_contents_view.cc b/ui/message_center/views/toast_contents_view.cc
index f414f60900e65aba8052734de36e17b95387838f..da7cd5dd28ceee653b7a3b222f15195e5d80efdd 100644
--- a/ui/message_center/views/toast_contents_view.cc
+++ b/ui/message_center/views/toast_contents_view.cc
@@ -199,7 +199,7 @@ void ToastContentsView::OnBoundsAnimationEndedOrCancelled(
// See crbug.com/243469
widget->Hide();
#if defined(OS_WIN)
- widget->SetOpacity(0xFF);
+ widget->SetOpacity(1.f);
#endif
widget->Close();
@@ -220,9 +220,8 @@ void ToastContentsView::AnimationProgressed(const gfx::Animation* animation) {
animated_bounds_start_, animated_bounds_end_));
GetWidget()->SetBounds(current);
} else if (animation == fade_animation_.get()) {
- unsigned char opacity =
- static_cast<unsigned char>(fade_animation_->GetCurrentValue() * 255);
- GetWidget()->SetOpacity(opacity);
+ GetWidget()->SetOpacity(
+ static_cast<float>(fade_animation_->GetCurrentValue()));
}
}
« no previous file with comments | « chrome/browser/ui/views/new_back_shortcut_bubble.cc ('k') | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698