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

Unified Diff: ui/app_list/views/speech_view.cc

Issue 1028023002: Make the app list speech view query able to span multiple lines. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@content_view_base_class
Patch Set: Created 5 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/speech_view.cc
diff --git a/ui/app_list/views/speech_view.cc b/ui/app_list/views/speech_view.cc
index 24e36f55b7c9fa6af784e50496db100656020e3d..6fd76708bd4e41ffda457ac269c2bf87cb3d3831 100644
--- a/ui/app_list/views/speech_view.cc
+++ b/ui/app_list/views/speech_view.cc
@@ -138,10 +138,9 @@ SpeechView::SpeechView(AppListViewDelegate* delegate)
// TODO(mukai): use BoundedLabel to cap 2 lines.
ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
- // TODO(calamity): make this label multiline once Label caches its RenderText.
- // See http://crbug.com/450791.
speech_result_ = new views::Label(
base::string16(), bundle.GetFontList(ui::ResourceBundle::LargeFont));
+ speech_result_->SetMultiLine(true);
speech_result_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
container->AddChildView(speech_result_);
@@ -223,6 +222,7 @@ void SpeechView::OnSpeechResult(const base::string16& result,
bool is_final) {
speech_result_->SetText(result);
speech_result_->SetEnabledColor(kResultTextColor);
+ Layout();
}
void SpeechView::OnSpeechRecognitionStateChanged(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698