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

Unified Diff: chrome/browser/chromeos/login/helper.cc

Issue 5180002: Adjust default font sizes for new hand hinted fonts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: introduce CROS_HAND_HINTED_FONTS define, fix oobe/login buttons, dropdowns Created 10 years, 1 month 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
Index: chrome/browser/chromeos/login/helper.cc
diff --git a/chrome/browser/chromeos/login/helper.cc b/chrome/browser/chromeos/login/helper.cc
index b3905c08153172e1855ebb24ca872284c4275212..44d754864f548aac0685b96a86c50ff35019b996 100644
--- a/chrome/browser/chromeos/login/helper.cc
+++ b/chrome/browser/chromeos/login/helper.cc
@@ -10,6 +10,7 @@
#include "googleurl/src/gurl.h"
#include "grit/theme_resources.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
+#include "views/controls/button/menu_button.h"
#include "views/controls/button/native_button.h"
#include "views/controls/label.h"
#include "views/controls/textfield/textfield.h"
@@ -102,6 +103,12 @@ void CorrectLabelFontSize(views::Label* label) {
label->SetFont(label->font().DeriveFont(kFontSizeCorrectionDelta));
}
+void CorrectMenuButtonFontSize(views::MenuButton* button) {
+ if (button)
+ button->SetFont(button->font().DeriveFont(kFontSizeCorrectionDelta));
+}
+
+
void CorrectNativeButtonFontSize(views::NativeButton* button) {
if (button)
button->set_font(button->font().DeriveFont(kFontSizeCorrectionDelta));
@@ -120,9 +127,13 @@ namespace login {
// Minimal width for the button.
const int kButtonMinWidth = 90;
+const int kButtonHeightDelta = 2;
gfx::Size WideButton::GetPreferredSize() {
gfx::Size preferred_size = NativeButton::GetPreferredSize();
+ // Decrease vertical margins.
+ preferred_size.set_height(preferred_size.height() - kButtonHeightDelta);
+ // Set minimal width.
if (preferred_size.width() < kButtonMinWidth)
preferred_size.set_width(kButtonMinWidth);
return preferred_size;

Powered by Google App Engine
This is Rietveld 408576698