Skip to content

Commit

Permalink
fixup! RampPlugValueWidget : Fix valueChanged icon
Browse files Browse the repository at this point in the history
  • Loading branch information
ericmehl committed Mar 27, 2024
1 parent 9faaab1 commit 5cdd19a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions python/GafferUI/RampPlugValueWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,14 @@ def __init__( self, plug, **kw ) :
self.__lastPositionChangedReason = None
self.__positionsMergeGroupId = 0

self.__positionLabel = GafferUI.LabelPlugValueWidget( plug.pointXPlug( 0 ) )
labelWidth = 50

self.__positionLabel = GafferUI.LabelPlugValueWidget( plug.pointXPlug( 0 ), horizontalAlignment = GafferUI.HorizontalAlignment.Right )
self.__positionLabel.label()._qtWidget().setFixedWidth( labelWidth )
self.__positionField = GafferUI.NumericPlugValueWidget( plug.pointXPlug( 0 ) )

self.__valueLabel = GafferUI.LabelPlugValueWidget( plug.pointYPlug( 0 ) )
self.__valueLabel = GafferUI.LabelPlugValueWidget( plug.pointYPlug( 0 ), horizontalAlignment = GafferUI.HorizontalAlignment.Right )
self.__valueLabel.label()._qtWidget().setFixedWidth( labelWidth )
if isinstance( plug.pointYPlug( 0 ), Gaffer.FloatPlug ) :
self.__valueField = GafferUI.NumericPlugValueWidget( plug.pointYPlug( 0 ) )
else:
Expand All @@ -105,8 +109,6 @@ def __init__( self, plug, **kw ) :
grid.addChild( self.__valueLabel, ( 0, 1 ), ( GafferUI.HorizontalAlignment.Right, GafferUI.VerticalAlignment.Top ) )
grid.addChild( self.__valueField, ( 1, 1 ), ( GafferUI.HorizontalAlignment.Right, GafferUI.VerticalAlignment.Top ) )



self.setPlug( plug )

def __drawModeChanged( self, drawModeWidget ) :
Expand Down

0 comments on commit 5cdd19a

Please sign in to comment.