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

Unified Diff: ui/chromeos/ime/candidate_window_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 | « ui/chromeos/ime/candidate_view.cc ('k') | ui/chromeos/ime/infolist_window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/chromeos/ime/candidate_window_view.cc
diff --git a/ui/chromeos/ime/candidate_window_view.cc b/ui/chromeos/ime/candidate_window_view.cc
index 7182c361c2791c1a37d076c1557f3b8c2433827c..a37f2f0105a296749022f2eaa4d86afa42db28ce 100644
--- a/ui/chromeos/ime/candidate_window_view.cc
+++ b/ui/chromeos/ime/candidate_window_view.cc
@@ -101,7 +101,7 @@ class InformationTextArea : public views::View {
: min_width_(min_width) {
label_ = new views::Label;
label_->SetHorizontalAlignment(align);
- label_->SetBorder(views::Border::CreateEmptyBorder(2, 2, 2, 4));
+ label_->SetBorder(views::CreateEmptyBorder(2, 2, 2, 4));
SetLayoutManager(new views::FillLayout());
AddChildView(label_);
@@ -124,11 +124,8 @@ class InformationTextArea : public views::View {
// Sets the border thickness for top/bottom.
void SetBorderFromPosition(BorderPosition position) {
- SetBorder(views::Border::CreateSolidSidedBorder(
- (position == TOP) ? 1 : 0,
- 0,
- (position == BOTTOM) ? 1 : 0,
- 0,
+ SetBorder(views::CreateSolidSidedBorder(
+ (position == TOP) ? 1 : 0, 0, (position == BOTTOM) ? 1 : 0, 0,
GetNativeTheme()->GetSystemColor(
ui::NativeTheme::kColorId_MenuBorderColor)));
}
@@ -161,7 +158,7 @@ CandidateWindowView::CandidateWindowView(gfx::NativeView parent)
set_background(
views::Background::CreateSolidBackground(theme->GetSystemColor(
ui::NativeTheme::kColorId_WindowBackground)));
- SetBorder(views::Border::CreateSolidBorder(
+ SetBorder(views::CreateSolidBorder(
1, theme->GetSystemColor(ui::NativeTheme::kColorId_MenuBorderColor)));
SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0));
« no previous file with comments | « ui/chromeos/ime/candidate_view.cc ('k') | ui/chromeos/ime/infolist_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698