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

Unified Diff: ash/common/system/tray/tray_background_view.cc

Issue 2461693003: MD cros - Fix padding in system tray (Closed)
Patch Set: nit + rebase Created 4 years, 1 month 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/common/system/tray/tray_background_view.h ('k') | ash/common/system/user/tray_user.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/tray_background_view.cc
diff --git a/ash/common/system/tray/tray_background_view.cc b/ash/common/system/tray/tray_background_view.cc
index f59409926a50725861bbfb821c9b3a39d46cec61..f2e83fd4d189cc385642f91858f84a067a851c65 100644
--- a/ash/common/system/tray/tray_background_view.cc
+++ b/ash/common/system/tray/tray_background_view.cc
@@ -203,12 +203,6 @@ void TrayBackgroundView::TrayContainer::SetMargin(int main_axis_margin,
UpdateLayout();
}
-gfx::Size TrayBackgroundView::TrayContainer::GetPreferredSize() const {
- if (size_.IsEmpty())
- return views::View::GetPreferredSize();
- return size_;
-}
-
void TrayBackgroundView::TrayContainer::ChildPreferredSizeChanged(
views::View* child) {
PreferredSizeChanged();
@@ -245,7 +239,8 @@ void TrayBackgroundView::TrayContainer::UpdateLayout() {
SetBorder(views::Border::CreateEmptyBorder(insets + margin));
views::BoxLayout* layout = new views::BoxLayout(orientation, 0, 0, 0);
- layout->SetDefaultFlex(1);
+ if (!ash::MaterialDesignController::IsShelfMaterial())
+ layout->SetDefaultFlex(1);
layout->set_minimum_cross_axis_size(kTrayItemSize);
views::View::SetLayoutManager(layout);
« no previous file with comments | « ash/common/system/tray/tray_background_view.h ('k') | ash/common/system/user/tray_user.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698