summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsschmitz@chromium.org <sschmitz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-10 00:03:33 +0000
committersschmitz@chromium.org <sschmitz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-10 00:03:33 +0000
commit03ba191c1308120bbb9bd116d8ceb16bcafa0f94 (patch)
treeb2bf5bbeef094e39427df1be8f1abf2ddd56c618
parente5d7dc8064620bff23c867a42ed9ed5ff0dd0683 (diff)
downloadchromium_src-03ba191c1308120bbb9bd116d8ceb16bcafa0f94.zip
chromium_src-03ba191c1308120bbb9bd116d8ceb16bcafa0f94.tar.gz
chromium_src-03ba191c1308120bbb9bd116d8ceb16bcafa0f94.tar.bz2
Adjust fonts (part of 137349): use standard font sizes in
chrome/browser/ui/views/avatar_menu_bubble_view.cc This is for Chrome on Windows. Part of work to use standard font sizes instead of "DeriveFont +/- N Pixels". Changed UIs were seen and blessed by sgabriel@ and kuscher@. The code now uses standard fonts: base and small. Base is used for the names. The resulting change is: Old: 13 pixels (bold for active, non-bold otherwise) New: 12 pixels (... same bolding) For the emails the font size did not change, since the std SmallFont was recently changed from 10 to 11 pixels. Please see crbug.com/169039 for before and after screenshots BUG=169039, 137349 TEST=manual Bring up Chrome on windows; click on avatar in top bar. Review URL: https://chromiumcodereview.appspot.com/11819035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175932 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/views/avatar_menu_bubble_view.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/chrome/browser/ui/views/avatar_menu_bubble_view.cc b/chrome/browser/ui/views/avatar_menu_bubble_view.cc
index 58e8964..a3dfcbf 100644
--- a/chrome/browser/ui/views/avatar_menu_bubble_view.cc
+++ b/chrome/browser/ui/views/avatar_menu_bubble_view.cc
@@ -20,7 +20,6 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/canvas.h"
-#include "ui/gfx/font.h"
#include "ui/gfx/image/canvas_image_source.h"
#include "ui/gfx/image/image.h"
#include "ui/views/controls/button/custom_button.h"
@@ -248,20 +247,18 @@ ProfileItemView::ProfileItemView(const AvatarMenuModel::Item& item,
// Add a label to show the profile name.
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- const gfx::Font base_font = rb.GetFont(ui::ResourceBundle::BaseFont);
- const int style = item_.active ? gfx::Font::BOLD : 0;
- const int kNameFontDelta = 1;
name_label_ = new views::Label(item_.name,
- base_font.DeriveFont(kNameFontDelta, style));
+ rb.GetFont(item_.active ?
+ ui::ResourceBundle::BoldFont :
+ ui::ResourceBundle::BaseFont));
name_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
AddChildView(name_label_);
// Add a label to show the sync state.
- const int kStateFontDelta = -1;
sync_state_label_ = new views::Label(item_.sync_state);
if (item_.signed_in)
sync_state_label_->SetElideBehavior(views::Label::ELIDE_AS_EMAIL);
- sync_state_label_->SetFont(base_font.DeriveFont(kStateFontDelta));
+ sync_state_label_->SetFont(rb.GetFont(ui::ResourceBundle::SmallFont));
sync_state_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
sync_state_label_->SetEnabled(false);
AddChildView(sync_state_label_);