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

Unified Diff: ui/views/examples/label_example.cc

Issue 2379993005: Label selection experiment (Closed)
Patch Set: -- Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/textfield/textfield_unittest.cc ('k') | ui/views/selection_controller.h » ('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..42fb899f3db9321c9044ab58eb3092e14b3c91cc 100644
--- a/ui/views/examples/label_example.cc
+++ b/ui/views/examples/label_example.cc
@@ -115,6 +115,14 @@ void LabelExample::CreateExampleView(View* container) {
label->SetBorder(Border::CreateSolidBorder(20, SK_ColorRED));
container->AddChildView(label);
+ label = new Label(
+ ASCIIToUTF16("A selectable label with custom colors for text."));
+ label->SetSelectionTextColor(SK_ColorBLUE);
+ label->SetSelectionBackgroundColor(SK_ColorYELLOW);
+ label->SetEnabledColor(SK_ColorRED);
+ label->SetSelectable(true);
+ container->AddChildView(label);
+
AddCustomLabel(container);
}
« no previous file with comments | « ui/views/controls/textfield/textfield_unittest.cc ('k') | ui/views/selection_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698