Index: ui/views/examples/multiline_example.cc |
diff --git a/ui/views/examples/multiline_example.cc b/ui/views/examples/multiline_example.cc |
index 86685a423ec73baf0426e57b5f9cccbfdd23684a..803ed775f575329ba3492a4175303067fb30d96e 100644 |
--- a/ui/views/examples/multiline_example.cc |
+++ b/ui/views/examples/multiline_example.cc |
@@ -72,6 +72,8 @@ class MultilineExample::RenderTextView : public View { |
render_text_->ApplyStyle(gfx::DIAGONAL_STRIKE, true, test_range); |
render_text_->SetStyle(gfx::UNDERLINE, false); |
render_text_->ApplyStyle(gfx::UNDERLINE, true, test_range); |
+ render_text_->ApplyStyle(gfx::BOLD, true, gfx::Range(3, 8)); |
msw
2014/04/29 06:24:45
Handle strings shorter than these hardcoded ranges
ckocagil
2014/05/01 22:02:01
Done.
|
+ render_text_->ApplyStyle(gfx::ITALIC, true, gfx::Range(5, 10)); |
InvalidateLayout(); |
} |
@@ -99,14 +101,15 @@ MultilineExample::~MultilineExample() { |
} |
void MultilineExample::CreateExampleView(View* container) { |
- const char kTestString[] = "test string asdf 1234 test string asdf 1234 " |
- "test string asdf 1234 test string asdf 1234"; |
+ const wchar_t kTestString[] = L"qwerty" |
msw
2014/04/29 06:24:45
Use base::char16
ckocagil
2014/05/01 22:02:01
I don't think we can do that (wchar_t isn't always
|
+ L"\x627\x644\x631\x626\x64A\x633\x64A\x629" |
msw
2014/04/29 06:24:45
nit: Is there any reason for changing the content
ckocagil
2014/05/01 22:02:01
For testing RTL runs.
|
+ L"asdfgh"; |
render_text_view_ = new RenderTextView(); |
- render_text_view_->SetText(ASCIIToUTF16(kTestString)); |
+ render_text_view_->SetText(kTestString); |
label_ = new Label(); |
- label_->SetText(ASCIIToUTF16(kTestString)); |
+ label_->SetText(kTestString); |
label_->SetMultiLine(true); |
label_->SetBorder(Border::CreateSolidBorder(2, SK_ColorCYAN)); |
@@ -117,7 +120,7 @@ void MultilineExample::CreateExampleView(View* container) { |
textfield_ = new Textfield(); |
textfield_->set_controller(this); |
- textfield_->SetText(ASCIIToUTF16(kTestString)); |
+ textfield_->SetText(kTestString); |
GridLayout* layout = new GridLayout(container); |
container->SetLayoutManager(layout); |