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

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

Issue 2693043002: [ios clean] Add overflow buttons for ToolsMenu. (Closed)
Patch Set: Use RTL for EdgeInssets Created 3 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
Index: ios/clean/chrome/browser/ui/tools/menu_overflow_controls_stackview.mm
diff --git a/ios/clean/chrome/browser/ui/tools/menu_overflow_controls_stackview.mm b/ios/clean/chrome/browser/ui/tools/menu_overflow_controls_stackview.mm
new file mode 100644
index 0000000000000000000000000000000000000000..8a5836a9439407b44e65876dd9050b3c48ca7efe
--- /dev/null
+++ b/ios/clean/chrome/browser/ui/tools/menu_overflow_controls_stackview.mm
@@ -0,0 +1,46 @@
+// Copyright 2017 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.
+
+#import "ios/clean/chrome/browser/ui/tools/menu_overflow_controls_stackview.h"
+
+#import "ios/clean/chrome/browser/ui/toolbar/toolbar_button+factory.h"
+
+@implementation MenuOverflowControlsStackView
+@synthesize toolsMenuButton = _toolsMenuButton;
+@synthesize shareButton = _shareButton;
+@synthesize reloadButton = _reloadButton;
+@synthesize stopButton = _stopButton;
+
+- (instancetype)init {
+ if ((self = [super init])) {
+ // PLACEHOLDER: Buttons and UI config is not final and will be improved.
+ [self setUpToolbarButtons];
+ [self addArrangedSubview:self.shareButton];
+ [self addArrangedSubview:self.stopButton];
+ [self addArrangedSubview:self.reloadButton];
+ [self addArrangedSubview:self.toolsMenuButton];
+
+ self.axis = UILayoutConstraintAxisHorizontal;
+ self.distribution = UIStackViewDistributionFillEqually;
+ }
+ return self;
+}
+
+#pragma mark - Components Setup
+
+- (void)setUpToolbarButtons {
+ // Tools menu button.
+ self.toolsMenuButton = [ToolbarButton toolsMenuToolbarButton];
+
+ // Share button.
+ self.shareButton = [ToolbarButton shareToolbarButton];
+
+ // Reload button.
+ self.reloadButton = [ToolbarButton reloadToolbarButton];
+
+ // Stop button.
+ self.stopButton = [ToolbarButton stopToolbarButton];
+}
+
+@end

Powered by Google App Engine
This is Rietveld 408576698