Fixed button highlight problem
This commit is contained in:
parent
692e5495cc
commit
85a44e7fc2
@ -170,12 +170,16 @@ class easyButton( gtk.Button ):
|
|||||||
self.add( Align1 )
|
self.add( Align1 )
|
||||||
|
|
||||||
self.connectSelf( "destroy", self.onDestroy )
|
self.connectSelf( "destroy", self.onDestroy )
|
||||||
|
self.connect( "released", self.onRelease )
|
||||||
# Reload icons when the theme changed
|
# Reload icons when the theme changed
|
||||||
self.themeChangedHandlerId = iconManager.connect("changed", self.themeChanged )
|
self.themeChangedHandlerId = iconManager.connect("changed", self.themeChanged )
|
||||||
|
|
||||||
def connectSelf( self, event, callback ):
|
def connectSelf( self, event, callback ):
|
||||||
self.connections.append( self.connect( event, callback ) )
|
self.connections.append( self.connect( event, callback ) )
|
||||||
|
|
||||||
|
def onRelease( self, widget ):
|
||||||
|
widget.set_state(gtk.STATE_NORMAL)
|
||||||
|
|
||||||
def onDestroy( self, widget ):
|
def onDestroy( self, widget ):
|
||||||
self.buttonImage.clear()
|
self.buttonImage.clear()
|
||||||
iconManager.disconnect( self.themeChangedHandlerId )
|
iconManager.disconnect( self.themeChangedHandlerId )
|
||||||
|
Loading…
Reference in New Issue
Block a user