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

Unified Diff: chrome/browser/ui/views/harmony/chrome_typography.cc

Issue 2904823002: Inactive toast ux changes (Closed)
Patch Set: Review / style fixes Created 3 years, 5 months 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/ui/views/harmony/chrome_typography.cc
diff --git a/chrome/browser/ui/views/harmony/chrome_typography.cc b/chrome/browser/ui/views/harmony/chrome_typography.cc
index ddeb5633bdc94e94bf998639715c87dd7556a9c1..e5eb14f91c812fea915e0eebe7a2f8d1744209d2 100644
--- a/chrome/browser/ui/views/harmony/chrome_typography.cc
+++ b/chrome/browser/ui/views/harmony/chrome_typography.cc
@@ -6,6 +6,18 @@
#include "ui/base/default_style.h"
#include "ui/base/resource/resource_bundle.h"
+#include "ui/gfx/platform_font.h"
+
+void ApplyCommonFontStyles(int context,
+ int style,
+ int* size_delta,
+ gfx::Font::Weight* weight) {
+ if (context == CONTEXT_WINDOWS10_NATIVE) {
+ *size_delta = 15 - gfx::PlatformFont::kDefaultBaseFontSize;
+ *weight = views::TypographyProvider::WeightNotLighterThanNormal(
+ gfx::Font::Weight::MEDIUM);
+ }
+}
const gfx::FontList& LegacyTypographyProvider::GetFont(int context,
int style) const {
@@ -20,6 +32,8 @@ const gfx::FontList& LegacyTypographyProvider::GetFont(int context,
ash::ApplyAshFontStyles(context, style, &size_delta, &font_weight);
#endif
+ ApplyCommonFontStyles(context, style, &size_delta, &font_weight);
+
switch (context) {
case CONTEXT_HEADLINE:
size_delta = kHeadlineDelta;

Powered by Google App Engine
This is Rietveld 408576698