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

Unified Diff: ui/chromeos/ime/infolist_window.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 | « ui/chromeos/ime/candidate_window_view.cc ('k') | ui/message_center/views/message_center_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/chromeos/ime/infolist_window.cc
diff --git a/ui/chromeos/ime/infolist_window.cc b/ui/chromeos/ime/infolist_window.cc
index 2dde013c614c397fb6cb3654bb88c38fed567e07..37e243d41c7bafc678ce344e77293403f85e7fc9 100644
--- a/ui/chromeos/ime/infolist_window.cc
+++ b/ui/chromeos/ime/infolist_window.cc
@@ -121,14 +121,14 @@ InfolistEntryView::InfolistEntryView(const ui::InfolistEntry& entry,
title_label_ = new views::Label(entry.title, title_font_list);
title_label_->SetPosition(gfx::Point(0, 0));
title_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- title_label_->SetBorder(views::Border::CreateEmptyBorder(4, 7, 2, 4));
+ title_label_->SetBorder(views::CreateEmptyBorder(4, 7, 2, 4));
description_label_ = new views::Label(entry.body, description_font_list);
description_label_->SetPosition(gfx::Point(0, 0));
description_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
description_label_->SetMultiLine(true);
description_label_->SizeToFit(kInfolistEntryWidth);
- description_label_->SetBorder(views::Border::CreateEmptyBorder(2, 17, 4, 4));
+ description_label_->SetBorder(views::CreateEmptyBorder(2, 17, 4, 4));
AddChildView(title_label_);
AddChildView(description_label_);
UpdateBackground();
@@ -155,13 +155,12 @@ void InfolistEntryView::UpdateBackground() {
set_background(
views::Background::CreateSolidBackground(GetNativeTheme()->GetSystemColor(
ui::NativeTheme::kColorId_TextfieldSelectionBackgroundFocused)));
- SetBorder(views::Border::CreateSolidBorder(
- 1,
- GetNativeTheme()->GetSystemColor(
- ui::NativeTheme::kColorId_FocusedBorderColor)));
+ SetBorder(views::CreateSolidBorder(
+ 1, GetNativeTheme()->GetSystemColor(
+ ui::NativeTheme::kColorId_FocusedBorderColor)));
} else {
set_background(NULL);
- SetBorder(views::Border::CreateEmptyBorder(1, 1, 1, 1));
+ SetBorder(views::CreateEmptyBorder(1, 1, 1, 1));
}
SchedulePaint();
}
@@ -183,10 +182,9 @@ InfolistWindow::InfolistWindow(views::View* candidate_window,
set_background(
views::Background::CreateSolidBackground(GetNativeTheme()->GetSystemColor(
ui::NativeTheme::kColorId_WindowBackground)));
- SetBorder(views::Border::CreateSolidBorder(
- 1,
- GetNativeTheme()->GetSystemColor(
- ui::NativeTheme::kColorId_MenuBorderColor)));
+ SetBorder(views::CreateSolidBorder(
+ 1, GetNativeTheme()->GetSystemColor(
+ ui::NativeTheme::kColorId_MenuBorderColor)));
SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0));
@@ -195,7 +193,7 @@ InfolistWindow::InfolistWindow(views::View* candidate_window,
caption_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
caption_label->SetEnabledColor(GetNativeTheme()->GetSystemColor(
ui::NativeTheme::kColorId_LabelEnabledColor));
- caption_label->SetBorder(views::Border::CreateEmptyBorder(2, 2, 2, 2));
+ caption_label->SetBorder(views::CreateEmptyBorder(2, 2, 2, 2));
caption_label->set_background(views::Background::CreateSolidBackground(
color_utils::AlphaBlend(SK_ColorBLACK,
GetNativeTheme()->GetSystemColor(
« no previous file with comments | « ui/chromeos/ime/candidate_window_view.cc ('k') | ui/message_center/views/message_center_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698