Commit 3a8ae8e4 authored by Alex Newcomer's avatar Alex Newcomer Committed by Commit Bot

cros: Make touchable menu labels up to spec

Increase the label size to 14px.

Bug: 888610
Change-Id: If7063fafcd8247601e3c7af0bf8b179f76f9df0c
Reviewed-on: https://chromium-review.googlesource.com/c/1329672Reviewed-by: default avatarMichael Wasserman <msw@chromium.org>
Reviewed-by: default avatarAlex Newcomer <newcomer@chromium.org>
Commit-Queue: Alex Newcomer <newcomer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607767}
parent 133f5790
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include "ui/gfx/color_utils.h" #include "ui/gfx/color_utils.h"
#include "ui/gfx/platform_font.h" #include "ui/gfx/platform_font.h"
#include "ui/native_theme/native_theme.h" #include "ui/native_theme/native_theme.h"
#include "ui/views/style/typography.h"
#include "ui/views/view.h" #include "ui/views/view.h"
#if defined(OS_WIN) #if defined(OS_WIN)
...@@ -112,9 +113,10 @@ int ChromeTypographyProvider::GetPlatformFontHeight(int font_context) { ...@@ -112,9 +113,10 @@ int ChromeTypographyProvider::GetPlatformFontHeight(int font_context) {
const gfx::FontList& ChromeTypographyProvider::GetFont(int context, const gfx::FontList& ChromeTypographyProvider::GetFont(int context,
int style) const { int style) const {
// "Target" font size constants from the Harmony spec. // "Target" font size constants.
constexpr int kHeadlineSize = 20; constexpr int kHeadlineSize = 20;
constexpr int kTitleSize = 15; constexpr int kTitleSize = 15;
constexpr int kTouchableLabelSize = 14;
constexpr int kBodyTextLargeSize = 13; constexpr int kBodyTextLargeSize = 13;
constexpr int kDefaultSize = 12; constexpr int kDefaultSize = 12;
...@@ -134,6 +136,10 @@ const gfx::FontList& ChromeTypographyProvider::GetFont(int context, ...@@ -134,6 +136,10 @@ const gfx::FontList& ChromeTypographyProvider::GetFont(int context,
case views::style::CONTEXT_DIALOG_TITLE: case views::style::CONTEXT_DIALOG_TITLE:
size_delta = kTitleSize - gfx::PlatformFont::kDefaultBaseFontSize; size_delta = kTitleSize - gfx::PlatformFont::kDefaultBaseFontSize;
break; break;
case views::style::CONTEXT_TOUCH_MENU:
size_delta =
kTouchableLabelSize - gfx::PlatformFont::kDefaultBaseFontSize;
break;
case CONTEXT_BODY_TEXT_LARGE: case CONTEXT_BODY_TEXT_LARGE:
case views::style::CONTEXT_MESSAGE_BOX_BODY_TEXT: case views::style::CONTEXT_MESSAGE_BOX_BODY_TEXT:
size_delta = kBodyTextLargeSize - gfx::PlatformFont::kDefaultBaseFontSize; size_delta = kBodyTextLargeSize - gfx::PlatformFont::kDefaultBaseFontSize;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment