Loading...
Searching...
No Matches
NCWidgetStyles.h
Go to the documentation of this file.
1//
2// NCWidgetStyles.h
3// Common styles and constants for navigation widgets
4//
5
6#import <UIKit/UIKit.h>
7
8NS_ASSUME_NONNULL_BEGIN
9
10// ============================================================================
11// Colors
12// ============================================================================
13
15static inline UIColor * kNCBaseBlackColor(void) {
16 return [UIColor colorWithRed:21./255 green:45./255 blue:71./255 alpha:1];
17}
18
20static inline UIColor * kNCBaseBlueColor(void) {
21 return [UIColor colorWithRed:48./255 green:170./255 blue:217./255 alpha:1];
22}
23
25static inline UIColor * kNCButtonBackgroundColor(void) {
26 return [UIColor colorWithRed:250./255 green:250./255 blue:250./255 alpha:0.8];
27}
28
30static inline UIColor * kNCButtonBackgroundColorOpaque(void) {
31 return [UIColor colorWithRed:250./255 green:250./255 blue:250./255 alpha:0.95];
32}
33
35static inline UIColor * kNCWhiteBackgroundColor(void) {
36 return [UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:0.95];
37}
38
40static inline UIColor * kNCBorderColor(void) {
41 return [UIColor colorWithRed:0.82 green:0.82 blue:0.82 alpha:1];
42}
43
45static inline UIColor * kNCShadowColor(void) {
46 return [UIColor colorWithRed:0.082 green:0.176 blue:0.278 alpha:0.2];
47}
48
49// ============================================================================
50// Sizes
51// ============================================================================
52
54static const CGFloat kNCStandardButtonWidth = 48.0;
55
57static const CGFloat kNCStandardButtonHeight = 48.0;
58
60static const CGFloat kNCZoomControlsHeight = 96.0;
61
63static const CGFloat kNCFloorRowHeight = 42.0;
64
66static const CGFloat kNCFloorSelectorMaxHeight = 250.0;
67
69static const NSInteger kNCMaxVisibleFloors = 6;
70
71// ============================================================================
72// Border Radius
73// ============================================================================
74
76static const CGFloat kNCBorderRadius = 4.0;
77
78// ============================================================================
79// Padding
80// ============================================================================
81
83static const CGFloat kNCStandardRightPadding = 4.0;
84
86static const CGFloat kNCStandardLeftPadding = 16.0;
87
89static const CGFloat kNCFloorSelectorTopPadding = 145.0;
90
92static const CGFloat kNCFollowMeBottomPadding = 48.0;
93
94// ============================================================================
95// Typography
96// ============================================================================
97
99static const CGFloat kNCButtonFontSize = 22.0;
100
102static const CGFloat kNCScrollButtonFontSize = 20.0;
103
105static const CGFloat kNCFloorSelectorFontSize = 17.0;
106
107// ============================================================================
108// Shadows
109// ============================================================================
110
112static const CGFloat kNCShadowOpacity = 1.0;
113
115static const CGFloat kNCShadowRadius = 6.0;
116
118static const CGSize kNCShadowOffset = {0, 4};
119
120// ============================================================================
121// Animations
122// ============================================================================
123
125static const NSTimeInterval kNCStandardAnimationDuration = 0.35;
126
128static const CGFloat kNCSpringAnimationDamping = 0.7;
129
131static const CGFloat kNCSpringAnimationInitialVelocity = 0.5;
132
133// ============================================================================
134// Borders
135// ============================================================================
136
138static const CGFloat kNCActiveBorderWidth = 1.5;
139
140NS_ASSUME_NONNULL_END