OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_UI_VIEWS_HARMONY_CHROME_TYPOGRAPHY_H_ | |
6 #define CHROME_BROWSER_UI_VIEWS_HARMONY_CHROME_TYPOGRAPHY_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "ui/views/style/typography.h" | |
10 #include "ui/views/style/typography_provider.h" | |
11 | |
12 enum ChromeTextContext { | |
13 // Headline text. Usually 20pt. Never multi-line. | |
14 CONTEXT_HEADLINE = views::typography::VIEWS_TEXT_CONTEXT_END + 1, | |
Peter Kasting
2017/03/17 02:26:00
Nit: No need for + 1, and it's confusing (2 places
tapted
2017/03/17 10:33:10
Done.
| |
15 | |
16 // "Body 1". Usually 13pt. | |
17 CONTEXT_DIALOG_MESSAGE, | |
Peter Kasting
2017/03/17 02:26:00
The one discomfort I have with putting "DIALOG" in
tapted
2017/03/17 10:33:10
How about BODY_TEXT_LARGE, BODY_TEXT_SMALL? (done)
Peter Kasting
2017/03/17 20:59:39
Yeah, I hear your concerns. What if we called the
tapted
2017/03/20 07:33:35
The specs don't really settle on one or the other
| |
18 | |
19 // "Body 2". Usually 12pt. | |
20 CONTEXT_DIALOG_TEXT_SMALL, | |
Peter Kasting
2017/03/17 02:25:59
Nit: "MESSAGE" above and "TEXT" here seem like the
tapted
2017/03/17 10:33:10
(see previous comment)
| |
21 | |
22 // ResourceBundle::SmallFont (11 pt). | |
Peter Kasting
2017/03/17 02:26:00
Nit: If this is "DEPRECATED", talk about what that
tapted
2017/03/17 10:33:10
Done.
| |
23 CONTEXT_DEPRECATED_SMALL, | |
24 }; | |
25 | |
26 enum ChromeTextStyle { | |
27 // Secondary text. May be lighter than views::typography::PRIMARY. | |
28 STYLE_SECONDARY = views::typography::VIEWS_TEXT_STYLE_END + 1, | |
29 | |
30 // "Hint" text, usually a line that gives context to something more important. | |
31 STYLE_HINT, | |
32 | |
33 // A solid shade of red. | |
34 STYLE_RED, | |
35 | |
36 // A solid shade of green. | |
37 STYLE_GREEN, | |
38 | |
39 // Used to draw attention to a web domain. | |
Peter Kasting
2017/03/17 02:26:00
Without reading the code, I'd have asked: Does thi
tapted
2017/03/17 10:33:10
I like STYLE_EMPHASIZED for now - it's a little to
| |
40 STYLE_WEB_DOMAIN, | |
41 | |
42 // Used to draw attention to an extension name. | |
43 STYLE_EXTENSION_NAME, | |
44 }; | |
45 | |
46 // TypographyProvider that provides pre-Harmony fonts in Chrome. | |
47 class LegacyTypographyProvider : public views::DefaultTypographyProvider { | |
48 public: | |
49 LegacyTypographyProvider() = default; | |
50 | |
51 // DefaultTypographyProvider: | |
52 const gfx::FontList& GetFont(int text_context, int text_style) const override; | |
53 | |
54 private: | |
55 DISALLOW_COPY_AND_ASSIGN(LegacyTypographyProvider); | |
56 }; | |
57 | |
58 #endif // CHROME_BROWSER_UI_VIEWS_HARMONY_CHROME_TYPOGRAPHY_H_ | |
OLD | NEW |