#NEWLINE# def __init__( self , plug , parenting = None ) : #NEWLINE# #INDENT# row = GafferUI . ListContainer ( GafferUI . ListContainer . Orientation . Horizontal , spacing = 2 ) #NEWLINE# GafferUI . PlugValueWidget . __init__ ( self , row , plug , parenting = parenting ) #NEWLINE# self . __imagePrefix = Gaffer . Metadata . plugValue ( plug , 'togglePlugValueWidget:imagePrefix' ) #NEWLINE# with row : #NEWLINE# #INDENT# self . __button = GafferUI . Button ( '' , ( self . __imagePrefix + 'Off.png' ) , hasFrame = False ) #NEWLINE# self . __clickedConnection = self . __button . clickedSignal ( ) . connect ( Gaffer . WeakMethod ( row . __clicked ) ) #NEWLINE# if ( not isinstance ( plug , Gaffer . BoolPlug ) ) : #NEWLINE# #INDENT# plugValueWidget = GafferUI . PlugValueWidget . create ( plug , useTypeOnly = True ) #NEWLINE# plugValueWidget . numericWidget ( ) . setFixedCharacterWidth ( 5 ) #NEWLINE# #UNINDENT# #UNINDENT# self . __toggleValue = Gaffer . Metadata . plugValue ( plug , 'togglePlugValueWidget:defaultToggleValue' ) #NEWLINE# self . _updateFromPlug ( )