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

Side by Side Diff: chrome/browser/ui/cocoa/dev_tools_controller.mm

Issue 22630011: [Cocoa] DevTools: align devtools splitter to integer pixels to avoid half-pixel artifacts on HiDPI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698