summaryrefslogtreecommitdiffstats
path: root/ui/base
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/base
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/base')
-rw-r--r--ui/base/resource/resource_bundle.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc
index 2cfe06c..46db04e 100644
--- a/ui/base/resource/resource_bundle.cc
+++ b/ui/base/resource/resource_bundle.cc
@@ -638,43 +638,43 @@ void ResourceBundle::LoadFontsIfNecessary() {
if (!bold_font_list_.get()) {
bold_font_list_.reset(new gfx::FontList());
- *bold_font_list_ = base_font_list_->DeriveFontList(
+ *bold_font_list_ = base_font_list_->DeriveWithStyle(
base_font_list_->GetFontStyle() | gfx::Font::BOLD);
}
if (!small_font_list_.get()) {
small_font_list_.reset(new gfx::FontList());
- *small_font_list_ = base_font_list_->DeriveFontListWithSize(
- base_font_list_->GetFontSize() + kSmallFontSizeDelta);
+ *small_font_list_ =
+ base_font_list_->DeriveWithSizeDelta(kSmallFontSizeDelta);
}
if (!small_bold_font_list_.get()) {
small_bold_font_list_.reset(new gfx::FontList());
- *small_bold_font_list_ = small_font_list_->DeriveFontList(
+ *small_bold_font_list_ = small_font_list_->DeriveWithStyle(
small_font_list_->GetFontStyle() | gfx::Font::BOLD);
}
if (!medium_font_list_.get()) {
medium_font_list_.reset(new gfx::FontList());
- *medium_font_list_ = base_font_list_->DeriveFontListWithSize(
- base_font_list_->GetFontSize() + kMediumFontSizeDelta);
+ *medium_font_list_ =
+ base_font_list_->DeriveWithSizeDelta(kMediumFontSizeDelta);
}
if (!medium_bold_font_list_.get()) {
medium_bold_font_list_.reset(new gfx::FontList());
- *medium_bold_font_list_ = medium_font_list_->DeriveFontList(
+ *medium_bold_font_list_ = medium_font_list_->DeriveWithStyle(
medium_font_list_->GetFontStyle() | gfx::Font::BOLD);
}
if (!large_font_list_.get()) {
large_font_list_.reset(new gfx::FontList());
- *large_font_list_ = base_font_list_->DeriveFontListWithSize(
- base_font_list_->GetFontSize() + kLargeFontSizeDelta);
+ *large_font_list_ =
+ base_font_list_->DeriveWithSizeDelta(kLargeFontSizeDelta);
}
if (!large_bold_font_list_.get()) {
large_bold_font_list_.reset(new gfx::FontList());
- *large_bold_font_list_ = large_font_list_->DeriveFontList(
+ *large_bold_font_list_ = large_font_list_->DeriveWithStyle(
large_font_list_->GetFontStyle() | gfx::Font::BOLD);
}
}