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

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

Issue 142523003: Renames gfx::FontList::Derive* family. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced. Created 6 years, 11 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 | « chrome/browser/ui/views/location_bar/location_bar_view.cc ('k') | ui/base/resource/resource_bundle.cc » ('j') | 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 c6bad7c4549b49784b51a01cca22d7698f78adab..8365423e80e0f0c5a8155071fc00bb6f3adf738c 100644
--- a/ui/app_list/views/speech_view.cc
+++ b/ui/app_list/views/speech_view.cc
@@ -27,7 +27,6 @@ namespace {
const int kShadowOffset = 1;
const int kShadowBlur = 4;
const int kSpeechViewMaxHeight = 300;
-const int kTextSize = 20;
const int kMicButtonMargin = 12;
const int kTextMargin = 32;
const int kIndicatorRadiusMax = 100;
@@ -116,10 +115,11 @@ SpeechView::SpeechView(AppListViewDelegate* delegate)
container->AddChildView(mic_button_);
// TODO(mukai): use BoundedLabel to cap 2 lines.
- speech_result_ = new views::Label();
+ ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
+ speech_result_ = new views::Label(
+ base::string16(), bundle.GetFontList(ui::ResourceBundle::LargeFont));
speech_result_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- const gfx::FontList& font_list = speech_result_->font_list();
- speech_result_->SetFontList(font_list.DeriveFontListWithSize(kTextSize));
+
speech_result_->SetMultiLine(true);
container->AddChildView(speech_result_);
@@ -142,8 +142,8 @@ void SpeechView::Reset() {
speech_result_->SetText(l10n_util::GetStringUTF16(
IDS_APP_LIST_SPEECH_HINT_TEXT));
speech_result_->SetEnabledColor(kHintTextColor);
- mic_button_->SetImage(views::Button::STATE_NORMAL, bundle.GetImageSkiaNamed(
- IDR_APP_LIST_SPEECH_MIC_ON));
+ mic_button_->SetImage(views::Button::STATE_NORMAL,
+ bundle.GetImageSkiaNamed(IDR_APP_LIST_SPEECH_MIC_ON));
}
int SpeechView::GetIndicatorRadius(uint8 level) {
@@ -215,8 +215,8 @@ void SpeechView::OnSpeechRecognitionStateChanged(
resource_id = IDR_APP_LIST_SPEECH_MIC_RECORDING;
ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
- mic_button_->SetImage(views::Button::STATE_NORMAL, bundle.GetImageSkiaNamed(
- resource_id));
+ mic_button_->SetImage(views::Button::STATE_NORMAL,
+ bundle.GetImageSkiaNamed(resource_id));
}
} // namespace app_list
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.cc ('k') | ui/base/resource/resource_bundle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698