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

Unified Diff: ash/system/tray/tray_item_view.cc

Issue 1849623002: Remove unused ash::SHELF_ALIGNMENT_TOP (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 | « ash/system/tray/tray_image_item.cc ('k') | ash/system/tray/tray_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/tray_item_view.cc
diff --git a/ash/system/tray/tray_item_view.cc b/ash/system/tray/tray_item_view.cc
index b338358f0c9b3aaddd2995b2a2d6697a3912606b..a1a749aed7805eb5357d46b1895838ef0ac47a1f 100644
--- a/ash/system/tray/tray_item_view.cc
+++ b/ash/system/tray/tray_item_view.cc
@@ -85,15 +85,13 @@ int TrayItemView::GetAnimationDurationMS() {
gfx::Size TrayItemView::GetPreferredSize() const {
gfx::Size size = DesiredSize();
- if (owner()->system_tray()->shelf_alignment() == SHELF_ALIGNMENT_BOTTOM ||
- owner()->system_tray()->shelf_alignment() == SHELF_ALIGNMENT_TOP)
+ if (owner()->system_tray()->shelf_alignment() == SHELF_ALIGNMENT_BOTTOM)
size.set_height(kTrayIconHeight);
else
size.set_width(kTrayIconWidth);
if (!animation_.get() || !animation_->is_animating())
return size;
- if (owner()->system_tray()->shelf_alignment() == SHELF_ALIGNMENT_BOTTOM ||
- owner()->system_tray()->shelf_alignment() == SHELF_ALIGNMENT_TOP) {
+ if (owner()->system_tray()->shelf_alignment() == SHELF_ALIGNMENT_BOTTOM) {
size.set_width(std::max(1,
static_cast<int>(size.width() * animation_->GetCurrentValue())));
} else {
@@ -113,8 +111,7 @@ void TrayItemView::ChildPreferredSizeChanged(views::View* child) {
void TrayItemView::AnimationProgressed(const gfx::Animation* animation) {
gfx::Transform transform;
- if (owner()->system_tray()->shelf_alignment() == SHELF_ALIGNMENT_BOTTOM ||
- owner()->system_tray()->shelf_alignment() == SHELF_ALIGNMENT_TOP) {
+ if (owner()->system_tray()->shelf_alignment() == SHELF_ALIGNMENT_BOTTOM) {
transform.Translate(0, animation->CurrentValueBetween(
static_cast<double>(height()) / 2, 0.));
} else {
« no previous file with comments | « ash/system/tray/tray_image_item.cc ('k') | ash/system/tray/tray_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698