| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_BASE_DEFAULT_STYLE_H_ | 5 #ifndef UI_BASE_DEFAULT_STYLE_H_ |
| 6 #define UI_BASE_DEFAULT_STYLE_H_ | 6 #define UI_BASE_DEFAULT_STYLE_H_ |
| 7 | 7 |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 | 9 |
| 10 // This file contains the constants that provide the default style for UI | 10 // This file contains the constants that provide the default style for UI |
| 11 // controls and dialogs. | 11 // controls and dialogs. |
| 12 | 12 |
| 13 namespace ui { | 13 namespace ui { |
| 14 | 14 |
| 15 // Default font size delta for messages in dialogs. Note that on Windows, the | 15 // Default font size delta for messages in dialogs. Note that on Windows, the |
| 16 // "base" font size is determined by consulting the system for the font used in | 16 // "base" font size is determined by consulting the system for the font used in |
| 17 // native MessageBox dialogs. On Mac, it is [NSFont systemFontSize]. Linux | 17 // native MessageBox dialogs. On Mac, it is [NSFont systemFontSize]. Linux |
| 18 // consults the default font description for a GTK Widget context. On ChromeOS, | 18 // consults the default font description for a GTK Widget context. On ChromeOS, |
| 19 // ui::ResourceBundle provides a description via IDS_UI_FONT_FAMILY_CROS. | 19 // ui::ResourceBundle provides a description via IDS_UI_FONT_FAMILY_CROS. |
| 20 const int kMessageFontSizeDelta = 0; | 20 const int kMessageFontSizeDelta = 0; |
| 21 | 21 |
| 22 // Default font size delta for dialog buttons, textfields, and labels. | 22 // Default font size delta for dialog buttons, textfields, and labels. |
| 23 #if defined(OS_MACOSX) | 23 #if defined(OS_MACOSX) |
| 24 // Cocoa dialogs prefer [NSFont smallSystemFontSize] for labels (typically 11pt | 24 // Aim for 12pt for Cocoa labels ([NSFont systemFontSize] is typically 13pt). |
| 25 // vs 13pt). | 25 const int kLabelFontSizeDelta = -1; |
| 26 const int kLabelFontSizeDelta = -2; | |
| 27 #else | 26 #else |
| 28 const int kLabelFontSizeDelta = 0; | 27 const int kLabelFontSizeDelta = 0; |
| 29 #endif | 28 #endif |
| 30 | 29 |
| 31 // Font size delta for dialog titles. | 30 // Font size delta for dialog titles. |
| 32 #if defined(OS_MACOSX) | 31 #if defined(OS_MACOSX) |
| 33 const int kTitleFontSizeDelta = 0; | 32 const int kTitleFontSizeDelta = 1; |
| 34 #else | 33 #else |
| 35 const int kTitleFontSizeDelta = 3; | 34 const int kTitleFontSizeDelta = 3; |
| 36 #endif | 35 #endif |
| 37 | 36 |
| 38 } // namespace ui | 37 } // namespace ui |
| 39 | 38 |
| 40 #endif // UI_BASE_DEFAULT_STYLE_H_ | 39 #endif // UI_BASE_DEFAULT_STYLE_H_ |
| OLD | NEW |