Exemplo n.º 1
0
class MountInfo(Gtk.Box):
    def __init__(self, data):
        Gtk.Box.__init__(self, orientation=Gtk.Orientation.VERTICAL, spacing=0)

        self.create_progress_bar_text()
        self.create_progress_bar()

        mount_detector_widget = MountDetector(self)  # @UnusedVariable

    def create_progress_bar_text(self):
        self.progress_bar_text = WhiteLabel("Storage: device no detected", angle=0, halign=Gtk.Align.CENTER)
        self.progress_bar_text.set_size_request(100, -1)
        self.set_margin_top(15)
        self.set_margin_bottom(15)

        self.pack_start(self.progress_bar_text, False, False, False)

    def create_progress_bar(self):
        self.progress_bar = Gtk.ProgressBar()
        self.progress_bar.set_fraction(0)
        self.progress_bar.set_show_text(True)
        self.progress_bar.set_text("-")
        self.progress_bar.set_size_request(100, 30)

        self.pack_start(self.progress_bar, False, False, False)
Exemplo n.º 2
0
    def create_progress_bar_text(self):
        self.progress_bar_text = WhiteLabel("Storage: device no detected", angle=0, halign=Gtk.Align.CENTER)
        self.progress_bar_text.set_size_request(100, -1)
        self.set_margin_top(15)
        self.set_margin_bottom(15)

        self.pack_start(self.progress_bar_text, False, False, False)
class ScrollableText(Gtk.ScrolledWindow):
    __gtype_name__ = 'ScrollableText'
    __name__ = 'ScrollableText' #@ReservedAssignment
    
    DEFAULT_BACKGROUND   = '#660707'
    
    DEFAULT_COLOR   = '#ffffff'
    
    def __init__(self, text):
        Gtk.ScrolledWindow.__init__(self)
        
        self.label = WhiteLabel(text)
        self.label.set_alignment(xalign=0, yalign=0)
        self.label.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse("#800000"))
        
        self.set_policy(Gtk.PolicyType.ALWAYS, Gtk.PolicyType.ALWAYS)
        self.add_with_viewport(self.label) 
        self.set_events(Gdk.EventMask.ALL_EVENTS_MASK)
        self.set_size_request(400, 600)
        self.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse(self.DEFAULT_BACKGROUND))
 def __init__(self, text):
     Gtk.ScrolledWindow.__init__(self)
     
     self.label = WhiteLabel(text)
     self.label.set_alignment(xalign=0, yalign=0)
     self.label.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse("#800000"))
     
     self.set_policy(Gtk.PolicyType.ALWAYS, Gtk.PolicyType.ALWAYS)
     self.add_with_viewport(self.label) 
     self.set_events(Gdk.EventMask.ALL_EVENTS_MASK)
     self.set_size_request(400, 600)
     self.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse(self.DEFAULT_BACKGROUND))