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

Side by Side Diff: ios/clean/chrome/browser/ui/tools/menu_overflow_controls_stackview.mm

Issue 2901663002: [ios clean] Fixes Menu Overflow Controls UI (Closed)
Patch Set: Created 3 years, 7 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 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 #import "ios/clean/chrome/browser/ui/tools/menu_overflow_controls_stackview.h" 5 #import "ios/clean/chrome/browser/ui/tools/menu_overflow_controls_stackview.h"
6 6
7 #import "ios/clean/chrome/browser/ui/toolbar/toolbar_button+factory.h" 7 #import "ios/clean/chrome/browser/ui/toolbar/toolbar_button+factory.h"
8 8
9 #if !defined(__has_feature) || !__has_feature(objc_arc)
10 #error "This file requires ARC support."
11 #endif
12
13 namespace {
14 const CGFloat kStackSpacing = 15.0;
15 }
16
9 @implementation MenuOverflowControlsStackView 17 @implementation MenuOverflowControlsStackView
10 @synthesize shareButton = _shareButton; 18 @synthesize shareButton = _shareButton;
11 @synthesize reloadButton = _reloadButton; 19 @synthesize reloadButton = _reloadButton;
12 @synthesize stopButton = _stopButton; 20 @synthesize stopButton = _stopButton;
21 @synthesize starButton = _starButton;
13 22
14 - (instancetype)init { 23 - (instancetype)init {
15 if ((self = [super init])) { 24 if ((self = [super init])) {
16 // PLACEHOLDER: Buttons and UI config is not final and will be improved.
17 [self setUpToolbarButtons]; 25 [self setUpToolbarButtons];
18 [self addArrangedSubview:self.shareButton]; 26 [self addArrangedSubview:self.shareButton];
27 [self addArrangedSubview:self.starButton];
19 [self addArrangedSubview:self.stopButton]; 28 [self addArrangedSubview:self.stopButton];
20 [self addArrangedSubview:self.reloadButton]; 29 [self addArrangedSubview:self.reloadButton];
21 30
31 self.spacing = kStackSpacing;
22 self.axis = UILayoutConstraintAxisHorizontal; 32 self.axis = UILayoutConstraintAxisHorizontal;
23 self.distribution = UIStackViewDistributionFillEqually; 33 self.distribution = UIStackViewDistributionFillEqually;
24 } 34 }
25 return self; 35 return self;
26 } 36 }
27 37
28 #pragma mark - Components Setup 38 #pragma mark - Components Setup
29 39
30 - (void)setUpToolbarButtons { 40 - (void)setUpToolbarButtons {
31 // Share button. 41 // Share button.
32 self.shareButton = [ToolbarButton shareToolbarButton]; 42 self.shareButton = [ToolbarButton shareToolbarButton];
33 43
34 // Reload button. 44 // Reload button.
35 self.reloadButton = [ToolbarButton reloadToolbarButton]; 45 self.reloadButton = [ToolbarButton reloadToolbarButton];
36 46
37 // Stop button. 47 // Stop button.
38 self.stopButton = [ToolbarButton stopToolbarButton]; 48 self.stopButton = [ToolbarButton stopToolbarButton];
49
50 // Star button.
51 self.starButton = [ToolbarButton starToolbarButton];
39 } 52 }
40 53
41 @end 54 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698