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

Issue 9834003: ash: Make sure the text-label entries in the tray look consistently good. (Closed)

Created:
8 years, 9 months ago by sadrul
Modified:
8 years, 9 months ago
CC:
chromium-reviews, dhollowa+watch_chromium.org, sadrul, ben+watch_chromium.org
Visibility:
Public.

Description

ash: Make sure the text-label entries in the tray look consistently good. BUG=119441 TEST=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=128211

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -9 lines) Patch
M ash/system/date/tray_date.cc View 2 chunks +2 lines, -5 lines 0 comments Download
M ash/system/ime/tray_ime.cc View 2 chunks +2 lines, -4 lines 0 comments Download
M ash/system/tray/tray_views.h View 2 chunks +7 lines, -0 lines 0 comments Download
M ash/system/tray/tray_views.cc View 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
sadrul
8 years, 9 months ago (2012-03-22 09:03:53 UTC) #1
Ben Goodger (Google)
8 years, 9 months ago (2012-03-22 14:55:54 UTC) #2
LGTM

On Thu, Mar 22, 2012 at 2:03 AM, <sadrul@chromium.org> wrote:

> Reviewers: Ben Goodger (Google),
>
> Description:
> ash: Make sure the text-label entries in the tray look consistently good.
>
> BUG=119441
> TEST=none
>
>
> Please review this at
http://codereview.chromium.**org/9834003/<http://codereview.chromium.org/9834...
>
> SVN Base:
svn://svn.chromium.org/chrome/**trunk/src<http://svn.chromium.org/chrome/trunk/src>
>
> Affected files:
>  M ash/system/date/tray_date.cc
>  M ash/system/ime/tray_ime.cc
>  M ash/system/tray/tray_views.h
>  M ash/system/tray/tray_views.cc
>
>
> Index: ash/system/date/tray_date.cc
> diff --git a/ash/system/date/tray_date.cc b/ash/system/date/tray_date.cc
> index 97bfa7ca8925302cd2c751cd48d10c**62a026bd93..**
> b7454dc1d4eeda262e6ee691d1803b**b9eeecfcfc 100644
> --- a/ash/system/date/tray_date.cc
> +++ b/ash/system/date/tray_date.cc
> @@ -8,6 +8,7 @@
>  #include "ash/system/date/date_view.h"
>  #include "ash/system/tray/system_tray_**delegate.h"
>  #include "ash/system/tray/tray_**constants.h"
> +#include "ash/system/tray/tray_views.h"
>  #include "base/i18n/time_formatting.h"
>  #include "base/stringprintf.h"
>  #include "base/time.h"
> @@ -42,11 +43,7 @@ TrayDate::~TrayDate() {
>
>  views::View* TrayDate::CreateTrayView(user:**:LoginStatus status) {
>   date_tray_.reset(new tray::DateView(tray::DateView:**:TIME));
> -  date_tray_->label()->SetFont(
> -      date_tray_->label()->font().**DeriveFont(2, gfx::Font::BOLD));
> -  date_tray_->label()->**SetAutoColorReadabilityEnabled**(false);
> -  date_tray_->label()->**SetEnabledColor(SK_ColorWHITE)**;
> -
> +  SetupLabelForTray(date_tray_->**label());
>   return date_tray_.get();
>  }
>
> Index: ash/system/ime/tray_ime.cc
> diff --git a/ash/system/ime/tray_ime.cc b/ash/system/ime/tray_ime.cc
> index 65616762e39bfc1130f1107b56e23f**ec4f158dd1..**
> b3694b235361636f06428107264b75**184ddcacdc 100644
> --- a/ash/system/ime/tray_ime.cc
> +++ b/ash/system/ime/tray_ime.cc
> @@ -8,6 +8,7 @@
>
>  #include "ash/shell.h"
>  #include "ash/system/tray/system_tray_**delegate.h"
> +#include "ash/system/tray/tray_views.h"
>  #include "base/logging.h"
>  #include "base/utf_string_conversions.**h"
>  #include "ui/gfx/font.h"
> @@ -36,10 +37,7 @@ void TrayIME::UpdateTrayLabel() {
>
>  views::View* TrayIME::CreateTrayView(user::**LoginStatus status) {
>   tray_label_.reset(new views::Label);
> -  tray_label_->SetFont(
> -      tray_label_->font().**DeriveFont(2, gfx::Font::BOLD));
> -  tray_label_->**SetAutoColorReadabilityEnabled**(false);
> -  tray_label_->SetEnabledColor(**SK_ColorWHITE);
> +  SetupLabelForTray(tray_label_.**get());
>   return tray_label_.get();
>  }
>
> Index: ash/system/tray/tray_views.cc
> diff --git a/ash/system/tray/tray_views.**cc b/ash/system/tray/tray_views.
> **cc
> index 9e84c10145bfab8ae0d7b183270af5**e08bf2b812..**
> 73f856fe27cebdfe9ae99e45d6098e**d9b189d42e 100644
> --- a/ash/system/tray/tray_views.**cc
> +++ b/ash/system/tray/tray_views.**cc
> @@ -85,5 +85,13 @@ void HoverHighlightView::**OnMouseExited(const
> views::MouseEvent& event) {
>   SchedulePaint();
>  }
>
> +void SetupLabelForTray(views::**Label* label) {
> +  label->SetFont(
> +      label->font().DeriveFont(2, gfx::Font::BOLD));
> +  label->**SetAutoColorReadabilityEnabled**(false);
> +  label->SetEnabledColor(SK_**ColorWHITE);
> +  label->SetBackgroundColor(**SkColorSetARGB(0, 255, 255, 255));
> +}
> +
>  }  // namespace internal
>  }  // namespace ash
> Index: ash/system/tray/tray_views.h
> diff --git a/ash/system/tray/tray_views.h b/ash/system/tray/tray_views.h
> index 4ba0597907d8ba3bfe33064baaae2e**570f1fdaf3..**
> bf0267a35efe6cabeeb1a59d6f2fc2**b239675362 100644
> --- a/ash/system/tray/tray_views.h
> +++ b/ash/system/tray/tray_views.h
> @@ -13,6 +13,10 @@
>
>  class SkBitmap;
>
> +namespace views {
> +class Label;
> +}
> +
>  namespace ash {
>  namespace internal {
>
> @@ -61,6 +65,9 @@ class HoverHighlightView : public views::View {
>   DISALLOW_COPY_AND_ASSIGN(**HoverHighlightView);
>  };
>
> +// Sets up a Label properly for the tray (sets color, font etc.).
> +void SetupLabelForTray(views::**Label* label);
> +
>  }  // namespace internal
>  }  // namespace ash
>
>
>
>

Powered by Google App Engine
This is Rietveld 408576698