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

Unified Diff: ui/views/examples/label_example.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/views/corewm/tooltip_aura.cc ('k') | ui/views/examples/multiline_example.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/examples/label_example.cc
diff --git a/ui/views/examples/label_example.cc b/ui/views/examples/label_example.cc
index 6683626e376dde7e3cbf1a7852e22064f5456e94..9e651d1b785171f66cec55cad64cb477a7220057 100644
--- a/ui/views/examples/label_example.cc
+++ b/ui/views/examples/label_example.cc
@@ -35,7 +35,7 @@ const char* kAlignments[] = { "Left", "Center", "Right", "Head" };
class PreferredSizeLabel : public Label {
public:
PreferredSizeLabel() : Label() {
- SetBorder(Border::CreateSolidBorder(1, SK_ColorGRAY));
+ SetBorder(CreateSolidBorder(1, SK_ColorGRAY));
}
~PreferredSizeLabel() override {}
@@ -112,7 +112,7 @@ void LabelExample::CreateExampleView(View* container) {
container->AddChildView(label);
label = new Label(ASCIIToUTF16("Label with thick border"));
- label->SetBorder(Border::CreateSolidBorder(20, SK_ColorRED));
+ label->SetBorder(CreateSolidBorder(20, SK_ColorRED));
container->AddChildView(label);
AddCustomLabel(container);
@@ -151,7 +151,7 @@ void LabelExample::ContentsChanged(Textfield* sender,
void LabelExample::AddCustomLabel(View* container) {
View* control_container = new View();
- control_container->SetBorder(Border::CreateSolidBorder(2, SK_ColorGRAY));
+ control_container->SetBorder(CreateSolidBorder(2, SK_ColorGRAY));
control_container->set_background(
Background::CreateSolidBackground(SK_ColorLTGRAY));
GridLayout* layout = GridLayout::CreatePanel(control_container);
« no previous file with comments | « ui/views/corewm/tooltip_aura.cc ('k') | ui/views/examples/multiline_example.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698