diff options
author | sschmitz@chromium.org <sschmitz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-20 00:07:28 +0000 |
---|---|---|
committer | sschmitz@chromium.org <sschmitz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-20 00:07:28 +0000 |
commit | 2c88217f8b26caf61c04901147f7f71b41d281a2 (patch) | |
tree | a593959771c637b507f23725da5bdf1b6f6cb81a | |
parent | b85bed0c0d52d60c1b45da69a49c8add558e0e84 (diff) | |
download | chromium_src-2c88217f8b26caf61c04901147f7f71b41d281a2.zip chromium_src-2c88217f8b26caf61c04901147f7f71b41d281a2.tar.gz chromium_src-2c88217f8b26caf61c04901147f7f71b41d281a2.tar.bz2 |
Adjust fonts (part of 137349): Use standard font sizes in ui/app_list
As part of a bigger issue (crbug.com/137349) we're adjusting fonts. Changing fonts and font sizes per direction from designers and to use standard font/sizes instead of DeriveFont +/-N pixels.
These changes affect the App List UI invoked by clicking on the App icon on the launcher. In the item view the UI is the same, we're just using a standard font name. In the search box the font size increased from 14 to 15 pixels. That was ok-d by a designer.
BUG=166491, 137349
TEST=manual: Click on App icon in launcher area; type in search text
Review URL: https://chromiumcodereview.appspot.com/11576058
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174040 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | ui/app_list/app_list_item_view.cc | 19 | ||||
-rw-r--r-- | ui/app_list/search_box_view.cc | 5 |
2 files changed, 3 insertions, 21 deletions
diff --git a/ui/app_list/app_list_item_view.cc b/ui/app_list/app_list_item_view.cc index 519b3ea..1a9fb78 100644 --- a/ui/app_list/app_list_item_view.cc +++ b/ui/app_list/app_list_item_view.cc @@ -39,7 +39,6 @@ const SkColor kHoverAndPushedColor = SkColorSetARGB(0x19, 0, 0, 0); const SkColor kSelectedColor = SkColorSetARGB(0x0D, 0, 0, 0); const SkColor kHighlightedColor = kHoverAndPushedColor; -const int kTitleFontSize = 11; const int kLeftRightPaddingChars = 1; // Scale to transform the icon when a drag starts. @@ -48,21 +47,6 @@ const float kDraggingIconScale = 1.5f; // Delay in milliseconds of when the dragging UI should be shown for mouse drag. const int kMouseDragUIDelayInMs = 100; -const gfx::Font& GetTitleFont() { - static gfx::Font* font = NULL; - - // Reuses current font. - if (font) - return *font; - - ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); - gfx::Font title_font(rb.GetFont(ui::ResourceBundle::BaseFont).GetFontName(), - kTitleFontSize); - title_font = title_font.DeriveFont(0, gfx::Font::BOLD); - font = new gfx::Font(title_font); - return *font; -} - } // namespace // static @@ -79,10 +63,11 @@ AppListItemView::AppListItemView(AppsGridView* apps_grid_view, touch_dragging_(false) { icon_->set_interactive(false); + ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); title_->SetBackgroundColor(0); title_->SetAutoColorReadabilityEnabled(false); title_->SetEnabledColor(kTitleColor); - title_->SetFont(GetTitleFont()); + title_->SetFont(rb.GetFont(ui::ResourceBundle::SmallBoldFont)); title_->SetHorizontalAlignment(gfx::ALIGN_LEFT); const gfx::ShadowValue kIconShadows[] = { diff --git a/ui/app_list/search_box_view.cc b/ui/app_list/search_box_view.cc index d0e3381..95cd83a 100644 --- a/ui/app_list/search_box_view.cc +++ b/ui/app_list/search_box_view.cc @@ -21,7 +21,6 @@ const int kPadding = 14; const int kIconDimension = 32; const int kPreferredWidth = 360; const int kPreferredHeight = 48; -const int kFontSize = 14; const int kEditHeight = 19; const SkColor kHintTextColor = SkColorSetRGB(0xA0, 0xA0, 0xA0); @@ -38,9 +37,7 @@ SearchBoxView::SearchBoxView(SearchBoxViewDelegate* delegate) search_box_->RemoveBorder(); ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); - search_box_->SetFont(gfx::Font( - rb.GetFont(ui::ResourceBundle::BaseFont).GetFontName(), - kFontSize)); + search_box_->SetFont(rb.GetFont(ui::ResourceBundle::MediumFont)); search_box_->set_placeholder_text_color(kHintTextColor); search_box_->SetController(this); AddChildView(search_box_); |