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

Side by Side Diff: remoting/ios/app/host_setup_header_view.mm

Issue 2957943002: [CRD iOS] Add the host setup instruction page (Closed)
Patch Set: Resolve Feedback Created 3 years, 5 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 unified diff | Download patch
« no previous file with comments | « remoting/ios/app/host_setup_header_view.h ('k') | remoting/ios/app/host_setup_view_cell.h » ('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 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 #if !defined(__has_feature) || !__has_feature(objc_arc)
6 #error "This file requires ARC support."
7 #endif
8
9 #import "remoting/ios/app/host_setup_header_view.h"
10
11 #import "ios/third_party/material_components_ios/src/components/Typography/src/M aterialTypography.h"
12 #import "remoting/ios/app/remoting_theme.h"
13
14 static const CGFloat kSetupTitleInset = 22.f;
15 static const CGFloat kBottomPadding = 6.f;
16
17 // TODO(yuweih): i18n
18 static NSString* const kSetupTitle =
19 @"Welcome to Chrome Remote Desktop.\n"
20 @"Let's get you setup.";
21
22 @implementation HostSetupHeaderView
23
24 - (instancetype)initWithFrame:(CGRect)frame {
25 if (self = [super initWithFrame:frame]) {
26 [self commonInit];
27 }
28 return self;
29 }
30
31 - (void)commonInit {
32 self.backgroundColor = RemotingTheme.setupListBackgroundColor;
33
34 UILabel* titleLabel = [[UILabel alloc] init];
35 titleLabel.text = kSetupTitle;
36 titleLabel.font = MDCTypography.titleFont;
37 titleLabel.numberOfLines = 2;
38 titleLabel.adjustsFontSizeToFitWidth = YES;
39 titleLabel.textColor = RemotingTheme.setupListTextColor;
40 [self addSubview:titleLabel];
41 titleLabel.translatesAutoresizingMaskIntoConstraints = NO;
42 [NSLayoutConstraint activateConstraints:@[
43 [titleLabel.leadingAnchor constraintEqualToAnchor:self.leadingAnchor
44 constant:kSetupTitleInset],
45 [titleLabel.trailingAnchor constraintEqualToAnchor:self.trailingAnchor
46 constant:-kSetupTitleInset],
47 [titleLabel.bottomAnchor constraintEqualToAnchor:self.bottomAnchor
48 constant:-kBottomPadding],
49 ]];
50 }
51
52 @end
OLDNEW
« no previous file with comments | « remoting/ios/app/host_setup_header_view.h ('k') | remoting/ios/app/host_setup_view_cell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698