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

Unified Diff: ash/system/network/tray_network.cc

Issue 10809008: Make spacing between uber tray items consistent with UI spec. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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/network/tray_network.cc
diff --git a/ash/system/network/tray_network.cc b/ash/system/network/tray_network.cc
index 5f816519284e0cd7fc02806749fc36a881101713..92cea1fbeac2f23f3b83e2419c2fe5a646c6d489 100644
--- a/ash/system/network/tray_network.cc
+++ b/ash/system/network/tray_network.cc
@@ -144,7 +144,8 @@ class NetworkTrayView : public TrayItemView {
public:
NetworkTrayView(ColorTheme size, bool tray_icon)
: color_theme_(size), tray_icon_(tray_icon) {
- SetLayoutManager(new views::FillLayout());
+ SetLayoutManager(
+ new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0));
image_view_ = color_theme_ == DARK ?
new FixedSizedImageView(0, kTrayPopupItemHeight) :
@@ -720,6 +721,8 @@ TrayNetwork::~TrayNetwork() {
views::View* TrayNetwork::CreateTrayView(user::LoginStatus status) {
CHECK(tray_ == NULL);
tray_ = new tray::NetworkTrayView(tray::LIGHT, true /*tray_icon*/);
+ UpdateAfterShelfAlignmentChange(
+ ash::Shell::GetInstance()->system_tray()->shelf_alignment());
return tray_;
}
@@ -762,6 +765,10 @@ void TrayNetwork::DestroyNotificationView() {
void TrayNetwork::UpdateAfterLoginStatusChange(user::LoginStatus status) {
}
+void TrayNetwork::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {
+ SetTrayImageItemBorder(tray_, alignment);
+}
+
void TrayNetwork::OnNetworkRefresh(const NetworkIconInfo& info) {
if (tray_)
tray_->Update(info);

Powered by Google App Engine
This is Rietveld 408576698