Closed TheRaztoR closed 2 years ago
The error message will be prevented in next release, it occurs only with colorWidget/colorFill because of a particular usage containers make of this properties (ie changing their scrollbar color).
Furthermore, the color properties of a modal widget does not accept the array format provided by an RGB widget directly.
That's expected. Another way to remove the bracket is to convert the array to a string:
#{"rgba(" + String(@{rgb_1}) + ")"}
The error message will be prevented in next release, it occurs only with colorWidget/colorFill because of a particular usage containers make of this properties (ie changing their scrollbar color).
Furthermore, the color properties of a modal widget does not accept the array format provided by an RGB widget directly.
That's expected. Another way to remove the bracket is to convert the array to a string:
#{"rgba(" + String(@{rgb_1}) + ")"}
That makes sense. I had tried converting the array to a string earlier using the "toString()" method, but your idea is more sensible. Thank you for the suggestion
Affected widgets:
OSC Version: 1.10.3
Issue: Fetching values from an RGB widget to control another widget's color properties results in the following error being generated:
Only the "colorText" property accepts values containing a point decimal (i.e 154.34) without generating an error. Furthermore, the color properties of a modal widget does not accept the array format provided by an RGB widget directly.
Example of a computed value for "colorFill" when fetching the values from an RGB widget using _@{your_rgb_widgetid}:
Note the square brackets that are automatically sent to the property, preventing the simple solution of prefixing the data with rgba(...)
However, by accessing the RGB widget's values as an indexed array, you can retrieve each value separately and repackage them directly inside the modal's color properties: _#{@{your_modal_widget_id}[0]}, #{@{your_modal_widgetid}[1]} etc. The modal color properties can then be dynamically updated while retrieving data from an RGB widget. However, this results in an error being reported every time the values are retrieved. The error is generated when specifically updating a modal's "colorWidget", "colorStroke" and "colorFill" properties using the retrieved values from an RGB widget. The "colorText" property updates as it should without any errors being generated.
Steps to reproduce:
rgba(#{@{rgb_id}[0]},#{@{rgb_id}[1]},#{@{rgb_id}[2]},#{@{rgb_id}[3]}