3
from enthought.traits.api import HasTraits
4
from enthought.traits.ui.api import View, Item
5
from enthought.savage.traits.ui.svg_button import SVGButton
7
from os.path import dirname, join, abspath
10
pause_icon = os.path.join(os.path.dirname(__file__), 'player_pause.svg')
11
resume_icon = os.path.join(os.path.dirname(__file__), 'player_play.svg')
13
class SVGDemo(HasTraits):
15
pause = SVGButton('Pause', filename=pause_icon,
16
toggle_filename=resume_icon,
18
toggle_label='Resume',
19
toggle_tooltip='Resume',
20
tooltip='Pause', toggle=True)
22
trait_view = View(Item('pause'))
24
SVGDemo().configure_traits()
3
from enthought.traits.api import HasTraits
4
from enthought.traits.ui.api import View, Item
5
from enthought.savage.traits.ui.svg_button import SVGButton
8
pause_icon = os.path.join(os.path.dirname(__file__), 'player_pause.svg')
9
resume_icon = os.path.join(os.path.dirname(__file__), 'player_play.svg')
11
class SVGDemo(HasTraits):
13
pause = SVGButton('Pause', filename=pause_icon,
14
toggle_filename=resume_icon,
16
toggle_label='Resume',
17
toggle_tooltip='Resume',
18
tooltip='Pause', toggle=True)
20
trait_view = View(Item('pause'))
22
SVGDemo().configure_traits()