Skip to content

Commit

Permalink
ColorChooser : Add channel names to sliders
Browse files Browse the repository at this point in the history
  • Loading branch information
ericmehl committed Jun 14, 2024
1 parent e40be84 commit 615579b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Improvements
- SceneInspector :
- Added support for dragging inspector labels, such as those containing the names of attributes, options, output parameters, parameters, primitive variables, and sets.
- Set names beginning with "__" such as "__lights" or "__cameras" are now displayed as-is, rather than being transformed to "Lights" or "Cameras".
- ColorChooser : Added channel names to identify sliders.

Fixes
-----
Expand Down
5 changes: 4 additions & 1 deletion python/GafferUI/ColorChooser.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ def __init__( self, color=imath.Color3f( 1 ), **kw ) :
for component in "rgbahsv" :
with GafferUI.ListContainer( GafferUI.ListContainer.Orientation.Horizontal, spacing = 4 ) :

numericWidget = GafferUI.NumericWidget( 0.0 )
with GafferUI.ListContainer( GafferUI.ListContainer.Orientation.Horizontal, spacing = 8 ) :
GafferUI.Label( component.capitalize() )
numericWidget = GafferUI.NumericWidget( 0.0 )

numericWidget.setFixedCharacterWidth( 6 )
numericWidget.component = component
self.__numericWidgets[component] = numericWidget
Expand Down

0 comments on commit 615579b

Please sign in to comment.