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

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

Issue 14949004: ash: Rename tray_views.{h,cc} to tray_utils.{h,cc} (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix browsertest Created 7 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
Index: ash/system/tray/tray_views.cc
diff --git a/ash/system/tray/tray_views.cc b/ash/system/tray/tray_views.cc
deleted file mode 100644
index f21eb05c34d31df3eee60e94f9a8f396777c27c7..0000000000000000000000000000000000000000
--- a/ash/system/tray/tray_views.cc
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray/tray_views.h"
-
-#include "ash/system/tray/tray_constants.h"
-#include "ash/system/tray/tray_item_view.h"
-#include "ui/gfx/font.h"
-#include "ui/views/border.h"
-#include "ui/views/controls/label.h"
-
-namespace ash {
-namespace internal {
-
-void SetupLabelForTray(views::Label* label) {
- // Making label_font static to avoid the time penalty of DeriveFont for
- // all but the first call.
- static const gfx::Font label_font(gfx::Font().DeriveFont(1, gfx::Font::BOLD));
- label->SetFont(label_font);
- label->SetAutoColorReadabilityEnabled(false);
- label->SetEnabledColor(SK_ColorWHITE);
- label->SetBackgroundColor(SkColorSetARGB(0, 255, 255, 255));
- label->SetShadowColors(SkColorSetARGB(64, 0, 0, 0),
- SkColorSetARGB(64, 0, 0, 0));
- label->SetShadowOffset(0, 1);
-}
-
-void SetTrayImageItemBorder(views::View* tray_view,
- ShelfAlignment alignment) {
- if (alignment == SHELF_ALIGNMENT_BOTTOM ||
- alignment == SHELF_ALIGNMENT_TOP) {
- tray_view->set_border(views::Border::CreateEmptyBorder(
- 0, kTrayImageItemHorizontalPaddingBottomAlignment,
- 0, kTrayImageItemHorizontalPaddingBottomAlignment));
- } else {
- tray_view->set_border(views::Border::CreateEmptyBorder(
- kTrayImageItemVerticalPaddingVerticalAlignment,
- kTrayImageItemHorizontalPaddingVerticalAlignment,
- kTrayImageItemVerticalPaddingVerticalAlignment,
- kTrayImageItemHorizontalPaddingVerticalAlignment));
- }
-}
-
-void SetTrayLabelItemBorder(TrayItemView* tray_view,
- ShelfAlignment alignment) {
- if (alignment == SHELF_ALIGNMENT_BOTTOM ||
- alignment == SHELF_ALIGNMENT_TOP) {
- tray_view->set_border(views::Border::CreateEmptyBorder(
- 0, kTrayLabelItemHorizontalPaddingBottomAlignment,
- 0, kTrayLabelItemHorizontalPaddingBottomAlignment));
- } else {
- // Center the label for vertical launcher alignment.
- int horizontal_padding = (tray_view->GetPreferredSize().width() -
- tray_view->label()->GetPreferredSize().width()) / 2;
- tray_view->set_border(views::Border::CreateEmptyBorder(
- kTrayLabelItemVerticalPaddingVeriticalAlignment,
- horizontal_padding,
- kTrayLabelItemVerticalPaddingVeriticalAlignment,
- horizontal_padding));
- }
-}
-
-} // namespace internal
-} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698