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

Unified Diff: chrome/browser/ui/cocoa/dev_tools_controller.mm

Issue 12871013: DevTools: respect minimum width/height when resizing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 9 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: chrome/browser/ui/cocoa/dev_tools_controller.mm
===================================================================
--- chrome/browser/ui/cocoa/dev_tools_controller.mm (revision 187863)
+++ chrome/browser/ui/cocoa/dev_tools_controller.mm (working copy)
@@ -229,6 +229,18 @@
return proposedPosition;
}
+- (CGFloat)splitView:(NSSplitView *)splitView
Avi (use Gerrit) 2013/03/19 14:43:23 no space before *
dgozman 2013/03/21 09:55:26 Done.
dgozman 2013/03/21 09:55:26 Done.
+ constrainMaxCoordinate:(CGFloat)proposedMax
+ ofSubviewAt:(NSInteger)dividerIndex {
Avi (use Gerrit) 2013/03/19 14:43:23 If you need to indent the "constrain" line, OK, bu
dgozman 2013/03/21 09:55:26 I did as in method above. Also, style guide sugges
+ if ([splitView_ isVertical]) {
+ return NSWidth([splitView_ frame]) - [splitView_ dividerThickness] -
+ devToolsWindow_->GetMinimumWidth();
+ } else {
+ return NSHeight([splitView_ frame]) - [splitView_ dividerThickness] -
+ devToolsWindow_->GetMinimumHeight();
+ }
+}
+
-(void)splitViewWillResizeSubviews:(NSNotification *)notification {
[[splitView_ window] disableScreenUpdatesUntilFlush];
}

Powered by Google App Engine
This is Rietveld 408576698