diff options
author | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-20 20:03:29 +0000 |
---|---|---|
committer | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-20 20:03:29 +0000 |
commit | 86cd1df6450f0838b670fdff392dd0d8401fc5ae (patch) | |
tree | 83cf55afd4aa00f9a7e22dbf9fbb10b02b74c24d /ash | |
parent | a8f4399a147e2e19a6ee21c7d8276cbec8f1ce22 (diff) | |
download | chromium_src-86cd1df6450f0838b670fdff392dd0d8401fc5ae.zip chromium_src-86cd1df6450f0838b670fdff392dd0d8401fc5ae.tar.gz chromium_src-86cd1df6450f0838b670fdff392dd0d8401fc5ae.tar.bz2 |
ash: Make the 'connected' networks bold in the network list.
BUG=109480, 119115
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9752005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127756 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/system/network/tray_network.cc | 15 | ||||
-rw-r--r-- | ash/system/tray/system_tray.cc | 3 | ||||
-rw-r--r-- | ash/system/tray/system_tray_delegate.h | 1 |
3 files changed, 14 insertions, 5 deletions
diff --git a/ash/system/network/tray_network.cc b/ash/system/network/tray_network.cc index 8976a97..c36b57a 100644 --- a/ash/system/network/tray_network.cc +++ b/ash/system/network/tray_network.cc @@ -69,13 +69,18 @@ class HoverHighlightView : public views::View { virtual ~HoverHighlightView() {} // Convenience function for adding an icon and a label. - void AddIconAndLabel(const SkBitmap& image, const string16& label) { + void AddIconAndLabel(const SkBitmap& image, + const string16& text, + gfx::Font::FontStyle style) { SetLayoutManager(new views::BoxLayout( views::BoxLayout::kHorizontal, 0, 3, kIconPaddingLeft)); views::ImageView* image_view = new FixedWidthImageView; image_view->SetImage(image); AddChildView(image_view); - AddChildView(new views::Label(label)); + + views::Label* label = new views::Label(text); + label->SetFont(label->font().DeriveFont(0, style)); + AddChildView(label); } void AddLabel(const string16& text) { @@ -310,7 +315,8 @@ class NetworkDetailedView : public views::View, views::BoxLayout::kVertical, 0, 0, 1)); for (size_t i = 0; i < list.size(); i++) { HoverHighlightView* container = new HoverHighlightView(this); - container->AddIconAndLabel(list[i].image, list[i].name); + container->AddIconAndLabel(list[i].image, list[i].name, + list[i].highlight ? gfx::Font::BOLD : gfx::Font::NORMAL); networks->AddChildView(container); network_map_[container] = list[i].service_path; } @@ -352,7 +358,8 @@ class NetworkDetailedView : public views::View, HoverHighlightView* container = new HoverHighlightView(this); container->AddIconAndLabel( *rb.GetImageNamed(IDR_AURA_UBER_TRAY_NETWORK_AIRPLANE).ToSkBitmap(), - rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_AIRPLANE_MODE)); + rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_AIRPLANE_MODE), + gfx::Font::NORMAL); AddChildView(container); airplane_ = container; } diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc index e345848..b116b1f6 100644 --- a/ash/system/tray/system_tray.cc +++ b/ash/system/tray/system_tray.cc @@ -369,7 +369,8 @@ class SystemTrayBubble : public views::BubbleDelegateView { } // namespace internal -NetworkIconInfo::NetworkIconInfo() { +NetworkIconInfo::NetworkIconInfo() + : highlight(false) { } NetworkIconInfo::~NetworkIconInfo() { diff --git a/ash/system/tray/system_tray_delegate.h b/ash/system/tray/system_tray_delegate.h index 45ba40d..dc5d033 100644 --- a/ash/system/tray/system_tray_delegate.h +++ b/ash/system/tray/system_tray_delegate.h @@ -23,6 +23,7 @@ struct ASH_EXPORT NetworkIconInfo { NetworkIconInfo(); ~NetworkIconInfo(); + bool highlight; SkBitmap image; string16 name; string16 description; |