⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 160142 in webkit


Ignore:
Timestamp:
Dec 4, 2013, 4:17:21 PM (13 years ago)
Author:
Antoine Quint
Message:

Web Inspector: use only two decimals for opacity in rgba/hsla colors
https://bugs.webkit.org/show_bug.cgi?id=125261

Reviewed by Joseph Pecoraro.

  • UserInterface/ColorPicker.js:

(WebInspector.ColorPicker.prototype._updateColor):

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r160134 r160142  
     12013-12-04  Antoine Quint  <graouts@apple.com>
     2
     3        Web Inspector: use only two decimals for opacity in rgba/hsla colors
     4        https://bugs.webkit.org/show_bug.cgi?id=125261
     5
     6        Reviewed by Joseph Pecoraro.
     7
     8        * UserInterface/ColorPicker.js:
     9        (WebInspector.ColorPicker.prototype._updateColor):
     10
    1112013-12-04  Antoine Quint  <graouts@apple.com>
    212
  • trunk/Source/WebInspectorUI/UserInterface/ColorPicker.js

    r160132 r160142  
    128128            return;
    129129
    130         var rgba = this._colorWheel.tintedColor.rgb.concat(this._opacity);
     130        var opacity = Math.round(this._opacity * 100) / 100;
     131        var rgba = this._colorWheel.tintedColor.rgb.concat(opacity);
    131132        this._color = new WebInspector.Color(WebInspector.Color.Format.RGBA, rgba).toString(this._colorFormat);
    132133        this.dispatchEventToListeners(WebInspector.ColorPicker.Event.ColorChanged, {color: this._color});
Note: See TracChangeset for help on using the changeset viewer.