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

Side by Side Diff: ash/common/system/chromeos/palette/palette_tray.cc

Issue 2675983003: views::Separator cleanup. (Closed)
Patch Set: revert test change Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/common/system/chromeos/palette/palette_tray.h" 5 #include "ash/common/system/chromeos/palette/palette_tray.h"
6 6
7 #include "ash/common/material_design/material_design_controller.h" 7 #include "ash/common/material_design/material_design_controller.h"
8 #include "ash/common/session/session_state_delegate.h" 8 #include "ash/common/session/session_state_delegate.h"
9 #include "ash/common/shelf/shelf_constants.h" 9 #include "ash/common/shelf/shelf_constants.h"
10 #include "ash/common/shelf/wm_shelf.h" 10 #include "ash/common/shelf/wm_shelf.h"
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 bubble_view->set_margins( 226 bubble_view->set_margins(
227 gfx::Insets(kPalettePaddingOnTop, 0, kPalettePaddingOnBottom, 0)); 227 gfx::Insets(kPalettePaddingOnTop, 0, kPalettePaddingOnBottom, 0));
228 228
229 // Add title. 229 // Add title.
230 auto* title_view = new TitleView(this); 230 auto* title_view = new TitleView(this);
231 title_view->SetBorder(views::CreateEmptyBorder( 231 title_view->SetBorder(views::CreateEmptyBorder(
232 gfx::Insets(0, kPaddingBetweenTitleAndLeftEdge, 0, 0))); 232 gfx::Insets(0, kPaddingBetweenTitleAndLeftEdge, 0, 0)));
233 bubble_view->AddChildView(title_view); 233 bubble_view->AddChildView(title_view);
234 234
235 // Add horizontal separator. 235 // Add horizontal separator.
236 views::Separator* separator = 236 views::Separator* separator = new views::Separator();
237 new views::Separator(views::Separator::HORIZONTAL);
238 separator->SetColor(kPaletteSeparatorColor); 237 separator->SetColor(kPaletteSeparatorColor);
239 separator->SetBorder(views::CreateEmptyBorder(gfx::Insets( 238 separator->SetBorder(views::CreateEmptyBorder(gfx::Insets(
240 kPaddingBetweenTitleAndSeparator, 0, kMenuSeparatorVerticalPadding, 0))); 239 kPaddingBetweenTitleAndSeparator, 0, kMenuSeparatorVerticalPadding, 0)));
241 bubble_view->AddChildView(separator); 240 bubble_view->AddChildView(separator);
242 241
243 // Add palette tools. 242 // Add palette tools.
244 // TODO(tdanderson|jdufault): Use SystemMenuButton to get the material design 243 // TODO(tdanderson|jdufault): Use SystemMenuButton to get the material design
245 // ripples. 244 // ripples.
246 std::vector<PaletteToolView> views = palette_tool_manager_->CreateViews(); 245 std::vector<PaletteToolView> views = palette_tool_manager_->CreateViews();
247 for (const PaletteToolView& view : views) 246 for (const PaletteToolView& view : views)
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 UpdateIconVisibility(); 446 UpdateIconVisibility();
448 } 447 }
449 } 448 }
450 449
451 void PaletteTray::UpdateIconVisibility() { 450 void PaletteTray::UpdateIconVisibility() {
452 SetVisible(is_palette_enabled_ && palette_utils::HasStylusInput() && 451 SetVisible(is_palette_enabled_ && palette_utils::HasStylusInput() &&
453 IsInUserSession()); 452 IsInUserSession());
454 } 453 }
455 454
456 } // namespace ash 455 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/ime_menu/ime_menu_tray.cc ('k') | ash/common/system/tray/special_popup_row.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698