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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui/Toolbar.js

Issue 2771063002: DevTools: make dropdown arrow spacing nicer (Closed)
Patch Set: use triangle-down, remove dropdown-arrow icon Created 3 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
OLDNEW
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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 */ 513 */
514 setBackgroundImage(iconURL) { 514 setBackgroundImage(iconURL) {
515 this.element.style.backgroundImage = 'url(' + iconURL + ')'; 515 this.element.style.backgroundImage = 'url(' + iconURL + ')';
516 } 516 }
517 517
518 /** 518 /**
519 * @param {number=} width 519 * @param {number=} width
520 */ 520 */
521 turnIntoSelect(width) { 521 turnIntoSelect(width) {
522 this.element.classList.add('toolbar-has-dropdown'); 522 this.element.classList.add('toolbar-has-dropdown');
523 var dropdownArrowIcon = UI.Icon.create('smallicon-dropdown-arrow', 'toolbar- dropdown-arrow'); 523 var dropdownArrowIcon = UI.Icon.create('smallicon-triangle-down', 'toolbar-d ropdown-arrow');
524 this.element.appendChild(dropdownArrowIcon); 524 this.element.appendChild(dropdownArrowIcon);
525 if (width) 525 if (width)
526 this.element.style.width = width + 'px'; 526 this.element.style.width = width + 'px';
527 } 527 }
528 528
529 /** 529 /**
530 * @param {!Event} event 530 * @param {!Event} event
531 */ 531 */
532 _clicked(event) { 532 _clicked(event) {
533 this.dispatchEventToListeners(UI.ToolbarButton.Events.Click, event); 533 this.dispatchEventToListeners(UI.ToolbarButton.Events.Click, event);
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 */ 828 */
829 UI.ToolbarComboBox = class extends UI.ToolbarItem { 829 UI.ToolbarComboBox = class extends UI.ToolbarItem {
830 /** 830 /**
831 * @param {?function(!Event)} changeHandler 831 * @param {?function(!Event)} changeHandler
832 * @param {string=} className 832 * @param {string=} className
833 */ 833 */
834 constructor(changeHandler, className) { 834 constructor(changeHandler, className) {
835 super(createElementWithClass('span', 'toolbar-select-container')); 835 super(createElementWithClass('span', 'toolbar-select-container'));
836 836
837 this._selectElement = this.element.createChild('select', 'toolbar-item'); 837 this._selectElement = this.element.createChild('select', 'toolbar-item');
838 var dropdownArrowIcon = UI.Icon.create('smallicon-dropdown-arrow', 'toolbar- dropdown-arrow'); 838 var dropdownArrowIcon = UI.Icon.create('smallicon-triangle-down', 'toolbar-d ropdown-arrow');
839 this.element.appendChild(dropdownArrowIcon); 839 this.element.appendChild(dropdownArrowIcon);
840 if (changeHandler) 840 if (changeHandler)
841 this._selectElement.addEventListener('change', changeHandler, false); 841 this._selectElement.addEventListener('change', changeHandler, false);
842 if (className) 842 if (className)
843 this._selectElement.classList.add(className); 843 this._selectElement.classList.add(className);
844 } 844 }
845 845
846 /** 846 /**
847 * @return {!HTMLSelectElement} 847 * @return {!HTMLSelectElement}
848 */ 848 */
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1054 /** 1054 /**
1055 * @param {!Common.Setting} setting 1055 * @param {!Common.Setting} setting
1056 * @param {string=} tooltip 1056 * @param {string=} tooltip
1057 * @param {string=} alternateTitle 1057 * @param {string=} alternateTitle
1058 */ 1058 */
1059 constructor(setting, tooltip, alternateTitle) { 1059 constructor(setting, tooltip, alternateTitle) {
1060 super(alternateTitle || setting.title() || '', tooltip); 1060 super(alternateTitle || setting.title() || '', tooltip);
1061 UI.SettingsUI.bindCheckbox(this.inputElement, setting); 1061 UI.SettingsUI.bindCheckbox(this.inputElement, setting);
1062 } 1062 }
1063 }; 1063 };
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/ui/Icon.js ('k') | third_party/WebKit/Source/devtools/front_end/ui/toolbar.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698