Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/SynthLab/Parameter.py
blob: 26f4014bd8cd6b229023ef92a227b7df81375928 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import pygtk
pygtk.require('2.0')
import gtk

import Config
from Util.ThemeWidgets import *

Tooltips = Config.Tooltips

class Parameter( gtk.Window ):
    def __init__( self, string ):
        gtk.Window.__init__( self, gtk.WINDOW_POPUP )
        self.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DIALOG)
        color = gtk.gdk.color_parse(Config.INST_BCK_COLOR)
        self.modify_bg(gtk.STATE_NORMAL, color)
        self.move(15, 650)
        self.set_size_request(450, 40)
        self.set_decorated(False)
        mainBox = RoundHBox(fillcolor=Config.INST_BCK_COLOR, bordercolor=Config.INST_BCK_COLOR)
        mainBox.set_border_width(4)
        mainBox.set_radius(10)
        self.text = gtk.Label(string)
        mainBox.pack_start(self.text, False, False, 5)
        self.add(mainBox)
        self.show_all()

    def update( self, string ):
        self.text.set_text(string)