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

Unified Diff: chrome/browser/ui/cocoa/chooser_content_view_cocoa.h

Issue 2208983002: Support multiple lines for status text on Chooser UI on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added TODO Created 4 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/chooser_content_view_cocoa.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/chooser_content_view_cocoa.h
diff --git a/chrome/browser/ui/cocoa/chooser_content_view_cocoa.h b/chrome/browser/ui/cocoa/chooser_content_view_cocoa.h
index 3a430c9fba81d6afd440c5b393ac239599b0acd2..42f09fb8f4ff6dcc3453e457b6c8af186a8bbce7 100644
--- a/chrome/browser/ui/cocoa/chooser_content_view_cocoa.h
+++ b/chrome/browser/ui/cocoa/chooser_content_view_cocoa.h
@@ -32,6 +32,34 @@ class ChooserContentViewController;
base::scoped_nsobject<NSButton> helpButton_;
std::unique_ptr<ChooserController> chooserController_;
std::unique_ptr<ChooserContentViewController> chooserContentViewController_;
+
+ CGFloat titleHeight_;
+ CGFloat statusHeight_;
+ CGFloat rescanButtonHeight_;
+ CGFloat connectButtonWidth_;
+ CGFloat connectButtonHeight_;
+ CGFloat cancelButtonWidth_;
+ CGFloat cancelButtonHeight_;
+ CGFloat messageHeight_;
+
+ struct FrameAndOrigin {
+ NSRect scroll_view_frame;
+ NSPoint connect_button_origin;
+ NSPoint cancel_button_origin;
+ };
+
+ // The cached |scrollView_| frame and |connectButton_| and |cancelButton_|
+ // origins for views layout:
+ // When |status_| is shown.
+ FrameAndOrigin statusShown_;
+ // When |rescanButton_| is shown.
+ FrameAndOrigin rescanButtonShown_;
+ // When neither |status_| nor |rescanButton_| is shown.
+ FrameAndOrigin noStatusOrRescanButtonShown_;
+
+ // The cached |status_| and |rescanButton_| origins.
+ NSPoint statusOrigin_;
+ NSPoint rescanButtonOrigin_;
}
// Designated initializer.
@@ -61,6 +89,24 @@ class ChooserContentViewController;
- (base::scoped_nsobject<NSButton>)createHyperlinkButtonWithText:
(NSString*)text;
+// Calculates the frame for the |scrollView_|.
+- (NSRect)calculateScrollViewFrame:(CGFloat)buttonRowHeight;
+
+// Calculates the origin for the |status_| text.
+- (NSPoint)calculateStatusOrigin:(CGFloat)buttonRowHeight;
+
+// Calculates the origin for the "Re-scan" button.
+- (NSPoint)calculateRescanButtonOrigin:(CGFloat)buttonRowHeight;
+
+// Calculates the origin for the "Connect" button.
+- (NSPoint)calculateConnectButtonOrigin:(CGFloat)buttonRowHeight;
+
+// Calculates the origin for the "Cancel" button.
+- (NSPoint)calculateCancelButtonOrigin:(CGFloat)buttonRowHeight;
+
+// Updates the origin and size of the view.
+- (void)updateView;
+
// Gets the table view for the chooser.
- (NSTableView*)tableView;
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/chooser_content_view_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698