summaryrefslogtreecommitdiffstats
path: root/ui/app_list
diff options
context:
space:
mode:
authoryukishiino@chromium.org <yukishiino@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-31 05:31:52 +0000
committeryukishiino@chromium.org <yukishiino@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-31 05:31:52 +0000
commit04b25011a789dcd404c4b4558d65617c95118686 (patch)
treee616631831ebbc14d6534f999ff9c1f1906c20e7 /ui/app_list
parent9d57129247f45a5d1c9de3c11221b6776e3f255b (diff)
downloadchromium_src-04b25011a789dcd404c4b4558d65617c95118686.zip
chromium_src-04b25011a789dcd404c4b4558d65617c95118686.tar.gz
chromium_src-04b25011a789dcd404c4b4558d65617c95118686.tar.bz2
Renames gfx::FontList::Derive* family.
1. Removes obsolete methods. - DeriveFontList(font_style) # The method name and argument are not clear compared to other versions. Use DeriveWithStyle(style) below instead. - DeriveFontListWithSize(absolute_size) # Don't specify the absolute size. 2. Renames very long named methods. - DeriveFontListWithSizeDeltaAndStyle => Derive - DeriveFontListWithSizeDelta => DeriveWithSizeDelta - new method => DeriveWithStyle Since DeriveFontListWithSizeDeltaAndStyle is used more often than DeriveFontListWithSizeDelta, so give the former a shorter name. Review URL: https://codereview.chromium.org/142523003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248131 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/app_list')
-rw-r--r--ui/app_list/views/speech_view.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/ui/app_list/views/speech_view.cc b/ui/app_list/views/speech_view.cc
index c6bad7c..8365423 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