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

Unified Diff: ash/system/status_area_widget_delegate.cc

Issue 176883022: Shelf Cleanup (- binary files) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 9 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 | « ash/system/session/logout_button_tray.cc ('k') | ash/system/tray/system_tray.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/status_area_widget_delegate.cc
diff --git a/ash/system/status_area_widget_delegate.cc b/ash/system/status_area_widget_delegate.cc
index 72a289db50e470d7d066a9b464e1961f0e0e11a9..8f88e3c0aa85199b635705564fbcdbd6ad31dc41 100644
--- a/ash/system/status_area_widget_delegate.cc
+++ b/ash/system/status_area_widget_delegate.cc
@@ -21,11 +21,6 @@
namespace ash {
namespace internal {
-namespace {
-
-const int kStatusTrayOffsetFromScreenEdge = 4;
-
-}
StatusAreaWidgetDelegate::StatusAreaWidgetDelegate()
: focus_cycler_for_testing_(NULL),
@@ -89,20 +84,13 @@ void StatusAreaWidgetDelegate::UpdateLayout() {
views::ColumnSet* columns = layout->AddColumnSet(0);
if (alignment_ == SHELF_ALIGNMENT_BOTTOM ||
alignment_ == SHELF_ALIGNMENT_TOP) {
- // Alternate shelf layout insets are all handled by tray_background_view.
- if (!ash::switches::UseAlternateShelfLayout()) {
- if (alignment_ == SHELF_ALIGNMENT_TOP)
- layout->SetInsets(kStatusTrayOffsetFromScreenEdge, 0, 0, 0);
- else
- layout->SetInsets(0, 0, kStatusTrayOffsetFromScreenEdge, 0);
- }
bool is_first_visible_child = true;
for (int c = 0; c < child_count(); ++c) {
views::View* child = child_at(c);
if (!child->visible())
continue;
if (!is_first_visible_child)
- columns->AddPaddingColumn(0, GetTraySpacing());
+ columns->AddPaddingColumn(0, kTraySpacing);
is_first_visible_child = false;
columns->AddColumn(views::GridLayout::CENTER, views::GridLayout::FILL,
0, /* resize percent */
@@ -115,12 +103,6 @@ void StatusAreaWidgetDelegate::UpdateLayout() {
layout->AddView(child);
}
} else {
- if (!ash::switches::UseAlternateShelfLayout()) {
- if (alignment_ == SHELF_ALIGNMENT_LEFT)
- layout->SetInsets(0, kStatusTrayOffsetFromScreenEdge, 0, 0);
- else
- layout->SetInsets(0, 0, 0, kStatusTrayOffsetFromScreenEdge);
- }
columns->AddColumn(views::GridLayout::FILL, views::GridLayout::CENTER,
0, /* resize percent */
views::GridLayout::USE_PREF, 0, 0);
@@ -130,7 +112,7 @@ void StatusAreaWidgetDelegate::UpdateLayout() {
if (!child->visible())
continue;
if (!is_first_visible_child)
- layout->AddPaddingRow(0, GetTraySpacing());
+ layout->AddPaddingRow(0, kTraySpacing);
is_first_visible_child = false;
layout->StartRow(0, 0);
layout->AddView(child);
« no previous file with comments | « ash/system/session/logout_button_tray.cc ('k') | ash/system/tray/system_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698