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

Side by Side Diff: ui/views/examples/textfield_example.cc

Issue 2943823002: Remove gfx::DIAGONAL_STRIKE and supporting code. (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « ui/views/examples/multiline_example.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/examples/textfield_example.h" 5 #include "ui/views/examples/textfield_example.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "ui/events/event.h" 10 #include "ui/events/event.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 142
143 if (name_->text().length() >= 5) { 143 if (name_->text().length() >= 5) {
144 size_t fifth = name_->text().length() / 5; 144 size_t fifth = name_->text().length() / 5;
145 const gfx::Range big_range(1 * fifth, 4 * fifth); 145 const gfx::Range big_range(1 * fifth, 4 * fifth);
146 name_->ApplyStyle(gfx::UNDERLINE, true, big_range); 146 name_->ApplyStyle(gfx::UNDERLINE, true, big_range);
147 name_->ApplyColor(SK_ColorBLUE, big_range); 147 name_->ApplyColor(SK_ColorBLUE, big_range);
148 148
149 const gfx::Range small_range(2 * fifth, 3 * fifth); 149 const gfx::Range small_range(2 * fifth, 3 * fifth);
150 name_->ApplyStyle(gfx::ITALIC, true, small_range); 150 name_->ApplyStyle(gfx::ITALIC, true, small_range);
151 name_->ApplyStyle(gfx::UNDERLINE, false, small_range); 151 name_->ApplyStyle(gfx::UNDERLINE, false, small_range);
152 name_->ApplyStyle(gfx::DIAGONAL_STRIKE, true, small_range);
153 name_->ApplyColor(SK_ColorRED, small_range); 152 name_->ApplyColor(SK_ColorRED, small_range);
154 } 153 }
155 } 154 }
156 } 155 }
157 } 156 }
158 157
159 } // namespace examples 158 } // namespace examples
160 } // namespace views 159 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/examples/multiline_example.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698