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

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

Issue 10411081: Fixup layout of power and sms notifications. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
« no previous file with comments | « no previous file | ash/system/power/tray_power.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/network/tray_sms.cc
diff --git a/ash/system/network/tray_sms.cc b/ash/system/network/tray_sms.cc
index 34cdd25ab8fab31a2219ebbbcfeb49d2111b4a0b..ab65fc7d882386d6d156c05c3b30cd1615aa434d 100644
--- a/ash/system/network/tray_sms.cc
+++ b/ash/system/network/tray_sms.cc
@@ -38,7 +38,6 @@ namespace {
const int kMessageListMinHeight = 200;
// Top/bottom padding of the text items.
const int kPaddingVertical = 10;
-const int kSmsIconWidth = 50;
} // namespace
@@ -255,7 +254,7 @@ class TraySms::SmsMessageView : public views::View,
IDR_AURA_UBER_TRAY_SMS));
int msg_width = kTrayPopupWidth - kNotificationCloseButtonWidth -
- kTrayPopupPaddingHorizontal - kSmsIconWidth;
+ kTrayPopupPaddingHorizontal - kNotificationIconWidth;
views::GridLayout* layout = new views::GridLayout(this);
SetLayoutManager(layout);
@@ -263,15 +262,19 @@ class TraySms::SmsMessageView : public views::View,
views::ColumnSet* columns = layout->AddColumnSet(0);
// Icon
- columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::CENTER,
+ columns->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL,
0 /* resize percent */,
- views::GridLayout::FIXED, kSmsIconWidth, kSmsIconWidth);
+ views::GridLayout::FIXED,
+ kNotificationIconWidth, kNotificationIconWidth);
+
+ columns->AddPaddingColumn(0, kTrayPopupPaddingHorizontal/2);
// Message
columns->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL,
0 /* resize percent */,
views::GridLayout::FIXED, msg_width, msg_width);
+ // Layout rows
layout->AddPaddingRow(0, kPaddingVertical);
layout->StartRow(0, 0);
« no previous file with comments | « no previous file | ash/system/power/tray_power.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698