diff options
author | jennyz@chromium.org <jennyz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-12 16:16:33 +0000 |
---|---|---|
committer | jennyz@chromium.org <jennyz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-12 16:16:33 +0000 |
commit | accdb8daf92d3375a2e6a49b688d4f7e4e45429b (patch) | |
tree | addf1619ac836c1d05ac7a045e4e15d331e3afca /ash | |
parent | 372438d3e1689870e658278e809790a84a4908d9 (diff) | |
download | chromium_src-accdb8daf92d3375a2e6a49b688d4f7e4e45429b.zip chromium_src-accdb8daf92d3375a2e6a49b688d4f7e4e45429b.tar.gz chromium_src-accdb8daf92d3375a2e6a49b688d4f7e4e45429b.tar.bz2 |
Make ash tray bubble detail view UI consistent with default view, slightly adjust other UI elements for better alignment UI effect per UI designer spec.
Removed the unused airplane mode entry code and resource from uber tray network bubble.
BUG=143533
TBR=sky
Review URL: https://chromiumcodereview.appspot.com/10910214
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156310 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/ash_strings.grd | 3 | ||||
-rw-r--r-- | ash/system/network/tray_network.cc | 19 | ||||
-rw-r--r-- | ash/system/tray/tray_constants.cc | 2 | ||||
-rw-r--r-- | ash/system/tray/tray_views.cc | 8 |
4 files changed, 11 insertions, 21 deletions
diff --git a/ash/ash_strings.grd b/ash/ash_strings.grd index c36f02b..ea443d1 100644 --- a/ash/ash_strings.grd +++ b/ash/ash_strings.grd @@ -262,9 +262,6 @@ Press Ctrl+Alt+Z to cancel. <message name="IDS_ASH_STATUS_TRAY_LOCALE_REVERT_MESSAGE" desc="Link to revert a change."> Change back to "<ph name="FROM_LOCALE">$1<ex>Italian</ex></ph>" (requires restart) </message> - <message name="IDS_ASH_STATUS_TRAY_AIRPLANE_MODE" desc="The label used in the network dialog to turn on airplane mode."> - Airplane mode - </message> <message name="IDS_ASH_STATUS_TRAY_ENABLE_WIFI" desc="The label used for the item to enable wifi."> Enable Wi-Fi </message> diff --git a/ash/system/network/tray_network.cc b/ash/system/network/tray_network.cc index 8914f2b..b54eb68 100644 --- a/ash/system/network/tray_network.cc +++ b/ash/system/network/tray_network.cc @@ -372,7 +372,7 @@ class NetworkListDetailedView : public NetworkDetailedView, gfx::Font::BOLD : gfx::Font::NORMAL); scroll_content()->AddChildViewAt(container, i); container->set_border(views::Border::CreateEmptyBorder(0, - kTrayPopupDetailsIconWidth, 0, 0)); + kTrayPopupPaddingHorizontal, 0, 0)); needs_relayout = true; } else { container = it->second; @@ -435,6 +435,9 @@ class NetworkListDetailedView : public NetworkDetailedView, container->AddIconAndLabel(info.image, info.description, gfx::Font::NORMAL); + container->set_border(views::Border::CreateEmptyBorder(0, + kTrayPopupPaddingHorizontal, 0, 0)); + } else { container->AddLabel(ui::ResourceBundle::GetSharedInstance(). GetLocalizedString(IDS_ASH_STATUS_TRAY_NETWORK_WIFI_DISABLED), @@ -442,8 +445,6 @@ class NetworkListDetailedView : public NetworkDetailedView, AddChildView(container); } - container->set_border(views::Border::CreateEmptyBorder(0, - kTrayPopupDetailsIconWidth, 0, 0)); scroll_content()->AddChildViewAt(container, 0); scroll_content()->SizeToPreferredSize(); static_cast<views::View*>(scroller())->Layout(); @@ -531,18 +532,6 @@ class NetworkListDetailedView : public NetworkDetailedView, turn_on_wifi_->parent()->Layout(); } - void AppendAirplaneModeEntry() { - ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); - HoverHighlightView* container = new HoverHighlightView(this); - container->set_fixed_height(kTrayPopupItemHeight); - container->AddIconAndLabel( - *rb.GetImageNamed(IDR_AURA_UBER_TRAY_NETWORK_AIRPLANE).ToImageSkia(), - rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_AIRPLANE_MODE), - gfx::Font::NORMAL); - AddChildView(container); - airplane_ = container; - } - // Adds a settings entry when logged in, and an entry for changing proxy // settings otherwise. void CreateSettingsEntry() { diff --git a/ash/system/tray/tray_constants.cc b/ash/system/tray/tray_constants.cc index ba123cc..fe9ce48 100644 --- a/ash/system/tray/tray_constants.cc +++ b/ash/system/tray/tray_constants.cc @@ -28,7 +28,7 @@ const int kTrayPopupPaddingBetweenItems = 10; const int kTrayPopupTextSpacingVertical = 4; const int kTrayPopupItemHeight = 48; -const int kTrayPopupDetailsIconWidth = 27; +const int kTrayPopupDetailsIconWidth = 25; const int kTrayRoundedBorderRadius = 2; const int kTrayBarButtonWidth = 39; diff --git a/ash/system/tray/tray_views.cc b/ash/system/tray/tray_views.cc index 0077ca4..1aa2050 100644 --- a/ash/system/tray/tray_views.cc +++ b/ash/system/tray/tray_views.cc @@ -27,6 +27,7 @@ namespace internal { namespace { const int kIconPaddingLeft = 5; +const int kPopupDetailLabelExtraLeftMargin = 8; const int kPaddingAroundButtons = 5; const int kBarImagesActive[] = { @@ -184,7 +185,7 @@ void HoverHighlightView::AddIconAndLabel(const gfx::ImageSkia& image, const string16& text, gfx::Font::FontStyle style) { SetLayoutManager(new views::BoxLayout( - views::BoxLayout::kHorizontal, 0, 3, kIconPaddingLeft)); + views::BoxLayout::kHorizontal, 0, 3, kTrayPopupPaddingBetweenItems)); views::ImageView* image_view = new FixedSizedImageView(kTrayPopupDetailsIconWidth, 0); image_view->SetImage(image); @@ -204,7 +205,7 @@ void HoverHighlightView::AddLabel(const string16& text, SetLayoutManager(new views::FillLayout()); text_label_ = new views::Label(text); text_label_->set_border(views::Border::CreateEmptyBorder( - 5, kTrayPopupDetailsIconWidth + kIconPaddingLeft, 5, 0)); + 5, kTrayPopupPaddingHorizontal + kPopupDetailLabelExtraLeftMargin, 5, 0)); text_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); text_label_->SetFont(text_label_->font().DeriveFont(0, style)); text_label_->SetDisabledColor(SkColorSetARGB(127, 0, 0, 0)); @@ -567,6 +568,9 @@ void SpecialPopupRow::SetTextLabel(int string_id, ViewClickListener* listener) { rb.GetLocalizedString(string_id), gfx::Font::BOLD); + container->set_border(views::Border::CreateEmptyBorder(0, + kTrayPopupPaddingHorizontal, 0, 0)); + container->SetAccessibleName( rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_PREVIOUS_MENU)); SetContent(container); |