OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/ui/cocoa/dev_tools_controller.h" | 5 #import "chrome/browser/ui/cocoa/dev_tools_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include <Cocoa/Cocoa.h> | 9 #include <Cocoa/Cocoa.h> |
10 | 10 |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 ofSubviewAt:(NSInteger)dividerIndex { | 210 ofSubviewAt:(NSInteger)dividerIndex { |
211 if ([splitView_ isVertical]) { | 211 if ([splitView_ isVertical]) { |
212 return NSWidth([splitView_ frame]) - [splitView_ dividerThickness] - | 212 return NSWidth([splitView_ frame]) - [splitView_ dividerThickness] - |
213 devToolsWindow_->GetMinimumWidth(); | 213 devToolsWindow_->GetMinimumWidth(); |
214 } else { | 214 } else { |
215 return NSHeight([splitView_ frame]) - [splitView_ dividerThickness] - | 215 return NSHeight([splitView_ frame]) - [splitView_ dividerThickness] - |
216 devToolsWindow_->GetMinimumHeight(); | 216 devToolsWindow_->GetMinimumHeight(); |
217 } | 217 } |
218 } | 218 } |
219 | 219 |
| 220 - (CGFloat)splitView:(NSSplitView *)splitView |
| 221 constrainSplitPosition:(CGFloat)proposedPosition |
| 222 ofSubviewAt:(NSInteger)dividerIndex { |
| 223 return round(proposedPosition); |
| 224 } |
| 225 |
220 -(void)splitViewWillResizeSubviews:(NSNotification *)notification { | 226 -(void)splitViewWillResizeSubviews:(NSNotification *)notification { |
221 [[splitView_ window] disableScreenUpdatesUntilFlush]; | 227 [[splitView_ window] disableScreenUpdatesUntilFlush]; |
222 } | 228 } |
223 | 229 |
224 @end | 230 @end |
OLD | NEW |