Changeset 251744 in webkit
- Timestamp:
- Oct 29, 2019 5:10:28 PM (4 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r251682 r251744 1 2019-10-29 Nikita Vasilyev <nvasilyev@apple.com> 2 3 Web Inspector: Opacity slider background doesn't update when when hue slider moves 4 https://bugs.webkit.org/show_bug.cgi?id=203593 5 <rdar://problem/56723629> 6 7 Reviewed by Matt Baker. 8 9 * UserInterface/Views/ColorPicker.js: 10 (WI.ColorPicker.prototype.set color): 11 (WI.ColorPicker.prototype.colorSquareColorDidChange): 12 Remove unused function arguments. 13 14 (WI.ColorPicker.prototype.sliderValueDidChange): 15 Update the background of the opacity slider when the hue slider changes. 16 17 (WI.ColorPicker.prototype._updateOpacitySlider): Renamed from _updateSliders. 18 Drive-by: replace `var` with `let`. 19 1 20 2019-10-28 Nikita Vasilyev <nvasilyev@apple.com> 2 21 -
trunk/Source/WebInspectorUI/UserInterface/Views/ColorPicker.js
r251487 r251744 124 124 125 125 this._opacitySlider.value = this._color.alpha; 126 this._update Sliders(this._colorSquare.rawColor, this._color);126 this._updateOpacitySlider(); 127 127 128 128 this._showColorComponentInputs(); … … 144 144 { 145 145 this._updateColor(); 146 this._update Sliders(this._colorSquare.rawColor, this._colorSquare.tintedColor);146 this._updateOpacitySlider(); 147 147 } 148 148 … … 154 154 this._colorSquare.hue = value * 360; 155 155 this._updateColor(); 156 this._updateOpacitySlider(); 156 157 } 157 158 } … … 190 191 } 191 192 192 _update Sliders(rawColor, tintedColor)193 { 194 varrgb = this._colorSquare.tintedColor.rgb;195 varopaque = new WI.Color(WI.Color.Format.RGBA, rgb.concat(1)).toString();196 vartransparent = new WI.Color(WI.Color.Format.RGBA, rgb.concat(0)).toString();193 _updateOpacitySlider() 194 { 195 let rgb = this._colorSquare.tintedColor.rgb; 196 let opaque = new WI.Color(WI.Color.Format.RGBA, rgb.concat(1)).toString(); 197 let transparent = new WI.Color(WI.Color.Format.RGBA, rgb.concat(0)).toString(); 197 198 this._opacitySlider.element.style.setProperty("background-image", "linear-gradient(90deg, " + transparent + ", " + opaque + "), " + this._opacityPattern); 198 199 }
Note: See TracChangeset
for help on using the changeset viewer.