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

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

Issue 2480813003: Reduce views::Border creation verbosity by promoting factory functions (Closed)
Patch Set: fix bad merge 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.cc ('k') | ash/common/system/tray/tray_popup_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/tray_details_view.cc
diff --git a/ash/common/system/tray/tray_details_view.cc b/ash/common/system/tray/tray_details_view.cc
index e691981f70b70fea0978614432c4fd17c3404e04..7832b83cc57579d05d15d1df7e1e786cd5eb427c 100644
--- a/ash/common/system/tray/tray_details_view.cc
+++ b/ash/common/system/tray/tray_details_view.cc
@@ -110,10 +110,10 @@ class ScrollContentsView : public views::View,
return;
sticky_ = sticky;
if (sticky) {
- view_->SetBorder(views::Border::CreateSolidSidedBorder(
+ view_->SetBorder(views::CreateSolidSidedBorder(
0, 0, kHeaderRowSeparatorThickness, 0, kHeaderRowSeparatorColor));
} else {
- view_->SetBorder(views::Border::CreateSolidSidedBorder(
+ view_->SetBorder(views::CreateSolidSidedBorder(
kHeaderRowSeparatorThickness, 0, 0, 0, kHeaderRowSeparatorColor));
}
}
@@ -301,8 +301,8 @@ void TrayDetailsView::CreateTitleRow(int string_id) {
title_row_ = new SpecialPopupRow();
title_row_->SetTextLabel(string_id, this);
if (MaterialDesignController::IsSystemTrayMenuMaterial()) {
- title_row_->SetBorder(views::Border::CreateEmptyBorder(
- kTitleRowPaddingTop, 0, kTitleRowPaddingBottom, 0));
+ title_row_->SetBorder(views::CreateEmptyBorder(kTitleRowPaddingTop, 0,
+ kTitleRowPaddingBottom, 0));
AddChildViewAt(title_row_, 0);
// In material design, we use a customized bottom border which is nomally a
// simple separator (views::Separator) but can be combined with an
@@ -313,7 +313,7 @@ void TrayDetailsView::CreateTitleRow(int string_id) {
new views::Separator(views::Separator::HORIZONTAL);
separator->SetColor(kTitleRowSeparatorBorderColor);
separator->SetPreferredSize(kTitleRowSeparatorBorderHeight);
- separator->SetBorder(views::Border::CreateEmptyBorder(
+ separator->SetBorder(views::CreateEmptyBorder(
kTitleRowSeparatorHeight - kTitleRowSeparatorBorderHeight, 0, 0, 0));
title_row_separator_->AddChildView(separator);
AddChildViewAt(title_row_separator_, 1);
« no previous file with comments | « ash/common/system/tray/tray_background_view.cc ('k') | ash/common/system/tray/tray_popup_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698