| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 } | 204 } |
| 205 | 205 |
| 206 makeBlueOnHover() { | 206 makeBlueOnHover() { |
| 207 this._contentElement.classList.add('toolbar-blue-on-hover'); | 207 this._contentElement.classList.add('toolbar-blue-on-hover'); |
| 208 } | 208 } |
| 209 | 209 |
| 210 makeToggledGray() { | 210 makeToggledGray() { |
| 211 this._contentElement.classList.add('toolbar-toggled-gray'); | 211 this._contentElement.classList.add('toolbar-toggled-gray'); |
| 212 } | 212 } |
| 213 | 213 |
| 214 growVertically() { |
| 215 this._contentElement.classList.add('toolbar-grow-vertical'); |
| 216 } |
| 217 |
| 214 renderAsLinks() { | 218 renderAsLinks() { |
| 215 this._contentElement.classList.add('toolbar-render-as-links'); | 219 this._contentElement.classList.add('toolbar-render-as-links'); |
| 216 } | 220 } |
| 217 | 221 |
| 218 /** | 222 /** |
| 219 * @param {boolean} enabled | 223 * @param {boolean} enabled |
| 220 */ | 224 */ |
| 221 setEnabled(enabled) { | 225 setEnabled(enabled) { |
| 222 for (var item of this._items) | 226 for (var item of this._items) |
| 223 item.setEnabled(enabled); | 227 item.setEnabled(enabled); |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 * @param {boolean} x | 414 * @param {boolean} x |
| 411 */ | 415 */ |
| 412 setVisible(x) { | 416 setVisible(x) { |
| 413 if (this._visible === x) | 417 if (this._visible === x) |
| 414 return; | 418 return; |
| 415 this.element.classList.toggle('hidden', !x); | 419 this.element.classList.toggle('hidden', !x); |
| 416 this._visible = x; | 420 this._visible = x; |
| 417 if (this._toolbar && !(this instanceof UI.ToolbarSeparator)) | 421 if (this._toolbar && !(this instanceof UI.ToolbarSeparator)) |
| 418 this._toolbar._hideSeparatorDupes(); | 422 this._toolbar._hideSeparatorDupes(); |
| 419 } | 423 } |
| 424 |
| 425 setRightAligned(alignRight) { |
| 426 this.element.classList.toggle('toolbar-item-right-aligned', alignRight); |
| 427 } |
| 420 }; | 428 }; |
| 421 | 429 |
| 422 /** | 430 /** |
| 423 * @unrestricted | 431 * @unrestricted |
| 424 */ | 432 */ |
| 425 UI.ToolbarText = class extends UI.ToolbarItem { | 433 UI.ToolbarText = class extends UI.ToolbarItem { |
| 426 /** | 434 /** |
| 427 * @param {string=} text | 435 * @param {string=} text |
| 428 */ | 436 */ |
| 429 constructor(text) { | 437 constructor(text) { |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 896 return this.inputElement.checked; | 904 return this.inputElement.checked; |
| 897 } | 905 } |
| 898 | 906 |
| 899 /** | 907 /** |
| 900 * @param {boolean} value | 908 * @param {boolean} value |
| 901 */ | 909 */ |
| 902 setChecked(value) { | 910 setChecked(value) { |
| 903 this.inputElement.checked = value; | 911 this.inputElement.checked = value; |
| 904 } | 912 } |
| 905 }; | 913 }; |
| OLD | NEW |