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

Side by Side Diff: ios/chrome/today_extension/ui_util.h

Issue 2586713002: Upstream code and resources for Chrome on iOS extensions. (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
« no previous file with comments | « ios/chrome/today_extension/transparent_button.mm ('k') | ios/chrome/today_extension/ui_util.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 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 IOS_CHROME_TODAY_EXTENSION_UI_UTIL_H_
6 #define IOS_CHROME_TODAY_EXTENSION_UI_UTIL_H_
7
8 namespace ui_util {
9
10 // Inset for the widget.
11 // This value is only used on iOS10 as the value passed to
12 // |widgetMarginInsetsForProposedMarginInsets:| is used on previous versions.
13 extern const CGFloat kDefaultLeadingMarginInset;
14
15 // UI metrics to layout the Today extension.
16 extern const CGFloat kFirstLineHeight;
17 extern const CGFloat kFirstLineButtonMargin;
18 extern const CGFloat kSecondLineHeight;
19 extern const CGFloat kSecondLineVerticalPadding;
20 extern const CGFloat kUIButtonSeparator;
21 extern const CGFloat kUIButtonFrontShift;
22 extern const CGFloat kUIButtonCornerRadius;
23
24 extern const CGFloat kFooterVerticalMargin;
25 extern const CGFloat kFooterHorizontalMargin;
26 extern const CGFloat kTitleFontSize;
27
28 extern const CGFloat kEmptyLabelYOffset;
29
30 // Returns the color for the buttons.
31 UIColor* TitleColor();
32 UIColor* BorderColor();
33 UIColor* InkColor();
34 UIColor* TextColor();
35 UIColor* BackgroundColor();
36
37 UIColor* NormalTintColor();
38 UIColor* ActiveTintColor();
39
40 // Returns the color for footer text.
41 UIColor* FooterTextColor();
42
43 // Returns the color for empty widget label text.
44 UIColor* emptyLabelColor();
45
46 // Returns whether running on an iPad.
47 bool IsIPadIdiom();
48
49 // Returns whether the current language is right to left.
50 bool IsRTL();
51
52 // Returns the offset of Chrome icon in the title bar.
53 CGFloat ChromeIconOffset();
54
55 // Returns the offset of Chrome title in the title bar.
56 CGFloat ChromeTextOffset();
57
58 // Creates constraints so that |filler| fills entirely |container| and make them
59 // active.
60 void ConstrainAllSidesOfViewToView(UIView* container, UIView* filler);
61
62 } // namespace ui_util
63
64 #endif // IOS_CHROME_TODAY_EXTENSION_UI_UTIL_H_
OLDNEW
« no previous file with comments | « ios/chrome/today_extension/transparent_button.mm ('k') | ios/chrome/today_extension/ui_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698