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

Unified Diff: ui/base/default_style.h

Issue 1689623004: Start removing enum ui::ResourceBundle::FontStyle, fix MacViews font sizes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes for Mac Created 4 years, 10 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
« no previous file with comments | « ui/base/cocoa/menu_controller_unittest.mm ('k') | ui/base/resource/resource_bundle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/default_style.h
diff --git a/ui/base/default_style.h b/ui/base/default_style.h
new file mode 100644
index 0000000000000000000000000000000000000000..49790af2a8ee66dfb40d054e269a8dcef0cb6275
--- /dev/null
+++ b/ui/base/default_style.h
@@ -0,0 +1,40 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_BASE_DEFAULT_STYLE_H_
+#define UI_BASE_DEFAULT_STYLE_H_
+
+#include "build/build_config.h"
+
+// This file contains the constants that provide the default style for UI
+// controls and dialogs.
+
+namespace ui {
+
+// Default font size delta for messages in dialogs. Note that on Windows, the
+// "base" font size is determined by consulting the system for the font used in
+// native MessageBox dialogs. On Mac, it is [NSFont systemFontSize]. Linux
+// consults the default font description for a GTK Widget context. On ChromeOS,
+// ui::ResourceBundle provides a description via IDS_UI_FONT_FAMILY_CROS.
+const int kMessageFontSizeDelta = 0;
+
+// Default font size delta for dialog buttons, textfields, and labels.
+#if defined(OS_MACOSX)
+// Cocoa dialogs prefer [NSFont smallSystemFontSize] for labels (typically 11pt
+// vs 13pt).
+const int kLabelFontSizeDelta = -2;
+#else
+const int kLabelFontSizeDelta = 0;
+#endif
+
+// Font size delta for dialog titles.
+#if defined(OS_MACOSX)
+const int kTitleFontSizeDelta = 0;
+#else
+const int kTitleFontSizeDelta = 3;
+#endif
+
+} // namespace ui
+
+#endif // UI_BASE_DEFAULT_STYLE_H_
tapted 2016/02/24 08:13:28 This file is actually similar to chrome/browser/ui
« no previous file with comments | « ui/base/cocoa/menu_controller_unittest.mm ('k') | ui/base/resource/resource_bundle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698