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

Side by Side Diff: chrome/browser/resources/options/chromeos/display_options.js

Issue 967623002: Remove display-options-display-view-mirroring. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/resources/options/chromeos/display_options.css ('k') | 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 cr.exportPath('options'); 5 cr.exportPath('options');
6 6
7 /** 7 /**
8 * @typedef {{ 8 * @typedef {{
9 * availableColorProfiles: Array<{profileId: number, name: string}>, 9 * availableColorProfiles: Array<{profileId: number, name: string}>,
10 * colorProfile: number, 10 * colorProfile: number,
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 // The width/height should be same as the first display: 736 // The width/height should be same as the first display:
737 var width = Math.ceil(this.displays_[0].width * this.visualScale_); 737 var width = Math.ceil(this.displays_[0].width * this.visualScale_);
738 var height = Math.ceil(this.displays_[0].height * this.visualScale_); 738 var height = Math.ceil(this.displays_[0].height * this.visualScale_);
739 739
740 var numDisplays = Math.max(MIN_NUM_DISPLAYS, this.displays_.length); 740 var numDisplays = Math.max(MIN_NUM_DISPLAYS, this.displays_.length);
741 741
742 var totalWidth = width + numDisplays * MIRRORING_OFFSET_PIXELS; 742 var totalWidth = width + numDisplays * MIRRORING_OFFSET_PIXELS;
743 var totalHeight = height + numDisplays * MIRRORING_OFFSET_PIXELS; 743 var totalHeight = height + numDisplays * MIRRORING_OFFSET_PIXELS;
744 744
745 this.displaysView_.style.height = totalHeight + 'px'; 745 this.displaysView_.style.height = totalHeight + 'px';
746 this.displaysView_.classList.add(
747 'display-options-displays-view-mirroring');
748 746
749 // The displays should be centered. 747 // The displays should be centered.
750 var offsetX = 748 var offsetX =
751 $('display-options-displays-view').offsetWidth / 2 - totalWidth / 2; 749 $('display-options-displays-view').offsetWidth / 2 - totalWidth / 2;
752 750
753 for (var i = 0; i < numDisplays; i++) { 751 for (var i = 0; i < numDisplays; i++) {
754 var div = document.createElement('div'); 752 var div = document.createElement('div');
755 div.className = 'displays-display'; 753 div.className = 'displays-display';
756 div.style.top = i * MIRRORING_OFFSET_PIXELS + 'px'; 754 div.style.top = i * MIRRORING_OFFSET_PIXELS + 'px';
757 div.style.left = i * MIRRORING_OFFSET_PIXELS + offsetX + 'px'; 755 div.style.left = i * MIRRORING_OFFSET_PIXELS + offsetX + 'px';
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 mirroring, displays, layout, offset) { 954 mirroring, displays, layout, offset) {
957 DisplayOptions.getInstance().onDisplayChanged_( 955 DisplayOptions.getInstance().onDisplayChanged_(
958 mirroring, displays, layout, offset); 956 mirroring, displays, layout, offset);
959 }; 957 };
960 958
961 // Export 959 // Export
962 return { 960 return {
963 DisplayOptions: DisplayOptions 961 DisplayOptions: DisplayOptions
964 }; 962 };
965 }); 963 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/chromeos/display_options.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698